Commit Graph

507 Commits

Author SHA1 Message Date
esaminu
11a2b8c3c6 fix: return accountId if null networkId passed 2023-06-23 03:15:29 +04:00
esaminu
8f217f7a0b fix: return accountId if null networkId passed 2023-06-23 03:04:08 +04:00
Evgeny Kuzyakov
73ec84c474
Merge pull request #69 from esaminu/main
This PR adds a `networkId` prop to the `Widget` component to allow using a `near` object outside the singleton state to allow testing Mainnet components on a Testnet initialized VM or vice versa
2023-06-19 15:53:38 -07:00
esaminu
18a8aa8a28 chore: more detailed changelog 2023-06-20 02:47:56 +04:00
esaminu
5b9e9d4d68 chore: add changelog 2023-06-20 02:33:04 +04:00
esaminu
6090ca13cd fix: pass args through if network isn't testnet or mainnet 2023-06-20 02:05:24 +04:00
esaminu
e4a7446448 feat: add secondary cache & inject networkId to CommitButton 2023-06-16 05:48:13 +04:00
Evgeny Kuzyakov
1fa5e164f0 Expose Ethers.setChain 2023-06-14 16:55:11 -07:00
esaminu
fb1e122601 fix: find last config 2023-06-14 02:07:14 +04:00
esaminu
fccba56cf0 chore: rebuild 2023-06-13 05:11:58 +04:00
esaminu
1a26be600b fix: safe get + remove log 2023-06-13 05:11:13 +04:00
esaminu
6d40844d25 feat: use injected near + undefined accountId for non default network 2023-06-13 05:10:59 +04:00
esaminu
fe4f5a7e4a feat: rename to networkId + useAccount singleton 2023-06-13 05:10:41 +04:00
Osman Abdelnasir
780d562bd2 refactor: let to const
Co-authored-by: Evgeny Kuzyakov <h3r0k1ll3r@gmail.com>
2023-06-13 05:10:41 +04:00
esaminu
ce271b2073 fix: add optional chaining 2023-06-13 05:10:40 +04:00
esaminu
a72f2b22ba feat: separate cache & accounts by chainId 2023-06-13 05:10:28 +04:00
esaminu
0f38fc59ad feat: add useMultiNetworkNear & use last config 2023-06-13 05:10:06 +04:00
esaminu
2a7af94938 feat: remove MainnetWidget and use chainId prop 2023-06-13 05:10:06 +04:00
esaminu
1668be2cac test: unset useNear singleton 2023-06-13 05:10:06 +04:00
esaminu
4d1fb7a4de fix: null initial near 2023-06-13 05:10:06 +04:00
esaminu
446d60a2bf test: override chainId 2023-06-13 05:10:06 +04:00
esaminu
b08f922e25 feat: remove override and log 2023-06-13 05:10:06 +04:00
esaminu
2821a493d4 feat: memo 2023-06-13 05:10:06 +04:00
esaminu
a849695cd0 feat: use singleton hook 2023-06-13 05:10:06 +04:00
esaminu
f609ee94ba fix: context 2023-06-13 05:10:06 +04:00
esaminu
3cb1d62bfb fix: context 2023-06-13 05:10:06 +04:00
esaminu
98dab3b558 feat: add context 2023-06-13 05:10:06 +04:00
esaminu
db022b6688 feat: remove confirmtx if override near 2023-06-13 05:10:06 +04:00
esaminu
2da301dc38 feat: add near override 2023-06-13 05:10:06 +04:00
esaminu
d618715f06 feat: add near override 2023-06-13 05:10:06 +04:00
esaminu
fdb4091fe8 feat: add logs 2023-06-13 05:10:06 +04:00
esaminu
3f6f4b7c0d feat: add logs 2023-06-13 05:10:06 +04:00
esaminu
50df4e2edc feat: inject other near 2023-06-13 05:10:06 +04:00
esaminu
34a23dacf0 fix: hooks 2023-06-13 05:10:06 +04:00
esaminu
b4a52111d4 fix: remove lock 2023-06-13 05:10:06 +04:00
esaminu
0c0cd72eb4 feat: add mainnet widget 2023-06-13 05:10:04 +04:00
Evgeny Kuzyakov
492295a151 Merge branch 'master' of github.com:NearSocial/VM into dev 2023-06-08 14:24:36 -07:00
Evgeny Kuzyakov
381ddbdc8e
Merge pull request #78 from NearSocial/fix-markdown-xss-2.2.3
## 2.2.3

- Filter out rest of the args in `Markdown`.
2023-06-08 08:50:13 -07:00
Evgeny Kuzyakov
298774a9c9 Remove rehype-sanitize (unused) 2023-06-07 12:34:36 -07:00
Evgeny Kuzyakov
22ccfeb893 2.2.3: Add rehype-sanitize plugin to Markdown 2023-06-07 12:21:43 -07:00
Evgeny Kuzyakov
f69a5c9dae
Merge pull request #76 from NearSocial/expose-uri-component
- Expose `encodeURIComponent`, `decodeURIComponent`, `btoa`, `atob`, `isFinite`, `decodeURI` and `encodeURI` in the global scope.
- Refactor native functions into an object, making it easier to add new functions.
2023-06-06 08:22:12 -07:00
Evgeny Kuzyakov
d8ddefc1a6 Merge branch 'dev' of github.com:NearSocial/VM into expose-uri-component 2023-06-06 08:06:23 -07:00
Evgeny Kuzyakov
806731481e
Merge pull request #75 from NearSocial/fix-compilation-error-2.2.2
## 2.2.2

- Gracefully handle compilation errors in `VM`. Previously, the VM would throw an error when the compilation failed, which resulted in a blank screen. Now, the VM will render the error message instead.
2023-06-06 08:03:20 -07:00
Evgeny Kuzyakov
6db1008d4c Expose more native functions 2023-06-05 21:54:54 -07:00
Evgeny Kuzyakov
5cc6f929df 2.2.2: Gracefully handle compilation errors 2023-06-05 21:24:33 -07:00
Evgeny Kuzyakov
2f3245060c
Merge pull request #73 from NearSocial/release-2.2.1
## 2.2.1

- Fix href sanitization for non-lowercase attribute names.
- Add testnet URL to the config.
- Fix SecureIframe bug which did not allow posting a message to iframe window if iframeResizer was used
  An example of a valid `srcDoc` for a SecureIframe using iframeResizer:

```jsx
const code = `
<script>
// ...your code...

// define message handler
const handleMessage = (m) => {
  console.log('received message', m)
  document.getElementById("messageText").innerHTML = m;
};

// finally, configure iframe resizer options before importing the script
window.iFrameResizer = {
    onMessage: handleMessage
  }
</script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.6/iframeResizer.contentWindow.js"></script>
<p id="messageText">loading...</p>
`;

return (
  <div>
    <iframe
      iframeResizer
      className="w-100"
      srcDoc={code}
      message="my message"
    />
  </div>
);
```
2023-06-05 16:49:08 -07:00
Evgeny Kuzyakov
cf84979864 Remove unused variable 2023-06-05 15:05:06 -07:00
Evgeny Kuzyakov
e0303d0b83 Release 2.2.1 2023-06-05 15:03:52 -07:00
Evgeny Kuzyakov
0de1e48883
Merge pull request #72 from NearSocial/fix-href-sanitize
Fixes `<a>` href sanitization for non-lowercase attributes.
2023-06-05 12:04:08 -07:00
Evgeny Kuzyakov
3f58d1b2a0 Fix href sanitization 2023-06-05 10:05:56 -07:00