@metamask/connect-multichain 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.1]
11
+
12
+ ### Changed
13
+
14
+ - Bump `@metamask/multichain-api-client` to prevent `RPC request with id already seen.` error on extension when using firefox ([#60](https://github.com/MetaMask/connect-monorepo/pull/60))
15
+
16
+ ### Fixed
17
+
18
+ - Fixed incorrect caching of error responses for some requests/events ([#59](https://github.com/MetaMask/connect-monorepo/pull/59))
19
+
10
20
  ## [0.3.0]
11
21
 
12
22
  ### Changed
@@ -56,7 +66,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
56
66
 
57
67
  - Initial release
58
68
 
59
- [Unreleased]: https://github.com/MetaMask/metamask-connect-monorepo/compare/@metamask/connect-multichain@0.3.0...HEAD
69
+ [Unreleased]: https://github.com/MetaMask/metamask-connect-monorepo/compare/@metamask/connect-multichain@0.3.1...HEAD
70
+ [0.3.1]: https://github.com/MetaMask/metamask-connect-monorepo/compare/@metamask/connect-multichain@0.3.0...@metamask/connect-multichain@0.3.1
60
71
  [0.3.0]: https://github.com/MetaMask/metamask-connect-monorepo/compare/@metamask/connect-multichain@0.2.1...@metamask/connect-multichain@0.3.0
61
72
  [0.2.1]: https://github.com/MetaMask/metamask-connect-monorepo/compare/@metamask/connect-multichain@0.2.0...@metamask/connect-multichain@0.2.1
62
73
  [0.2.0]: https://github.com/MetaMask/metamask-connect-monorepo/compare/@metamask/connect-multichain@0.1.0...@metamask/connect-multichain@0.2.0
@@ -1565,6 +1565,10 @@ var DefaultTransport = class {
1565
1565
  window.removeEventListener("message", __privateGet(this, _handleResponseListener));
1566
1566
  __privateSet(this, _handleResponseListener, void 0);
1567
1567
  }
1568
+ if (__privateGet(this, _handleNotificationListener)) {
1569
+ window.removeEventListener("message", __privateGet(this, _handleNotificationListener));
1570
+ __privateSet(this, _handleNotificationListener, void 0);
1571
+ }
1568
1572
  for (const [, request] of __privateGet(this, _pendingRequests)) {
1569
1573
  clearTimeout(request.timeout);
1570
1574
  request.reject(new Error("Transport disconnected"));
@@ -2052,6 +2056,9 @@ var MWPTransport = class {
2052
2056
  }
2053
2057
  storeWalletSession(request, response) {
2054
2058
  return __async(this, null, function* () {
2059
+ if (response.error) {
2060
+ return;
2061
+ }
2055
2062
  if (CACHED_METHOD_LIST.includes(request.method)) {
2056
2063
  yield this.kvstore.set(SESSION_STORE_KEY, JSON.stringify(response));
2057
2064
  } else if (request.method === "eth_accounts") {