@dynamic-labs/ethereum 4.7.1 → 4.8.0

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
@@ -1,4 +1,30 @@
1
1
 
2
+ ## [4.8.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.7.2...v4.8.0) (2025-02-25)
3
+
4
+
5
+ ### Features
6
+
7
+ * add support for network switching for SOL wallets ([#8095](https://github.com/dynamic-labs/dynamic-auth/issues/8095)) ([8997b39](https://github.com/dynamic-labs/dynamic-auth/commit/8997b399e1e5cd294aad8b719d39928eed5e911d))
8
+ * add support for solNetworks override ([#8138](https://github.com/dynamic-labs/dynamic-auth/issues/8138)) ([8c3f374](https://github.com/dynamic-labs/dynamic-auth/commit/8c3f374a9b2b451f984aed98e7ce506552e2a6c5))
9
+ * **react-native:** add account abstraction multi-chain ([#8132](https://github.com/dynamic-labs/dynamic-auth/issues/8132)) ([c64a26e](https://github.com/dynamic-labs/dynamic-auth/commit/c64a26e16943d913edf4683084f59592a9aeedfc))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * ensure zero dev network cache use project id ([#8133](https://github.com/dynamic-labs/dynamic-auth/issues/8133)) ([408c4ed](https://github.com/dynamic-labs/dynamic-auth/commit/408c4ed764a623b6d870cd24973320e5ca4a74c7))
15
+
16
+ ### [4.7.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.7.1...v4.7.2) (2025-02-22)
17
+
18
+ ### Features
19
+
20
+ * add bitcoin rune support for token balances ([95640](https://github.com/dynamic-labs/dynamic-auth/commit/956403dc0e427e9a99c62e189fc59de0d8b11e1b))
21
+
22
+ ### Bug Fixes
23
+
24
+ * hidrate the user state when a valid token is present ([#8116](https://github.com/dynamic-labs/dynamic-auth/issues/8116)) ([dad5837](https://github.com/dynamic-labs/dynamic-auth/commit/dad58373c4c2fe0c870d918474d6a1f541eae659))
25
+ * prompt to re-establish wallet connect session for secondary wallets ([#8111](https://github.com/dynamic-labs/dynamic-auth/issues/8111)) ([c713ead](https://github.com/dynamic-labs/dynamic-auth/commit/c713ead0611c658aea3d7aca534c2ba2c3cab584))
26
+ * upgrade elliptic ([#8106](https://github.com/dynamic-labs/dynamic-auth/issues/8106)) ([359c873](https://github.com/dynamic-labs/dynamic-auth/commit/359c8733fdd8c0510c2f0018ee0fefa337847aae))
27
+
2
28
  ### [4.7.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.7.0...v4.7.1) (2025-02-20)
3
29
 
4
30
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.7.1";
6
+ var version = "4.8.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.7.1";
2
+ var version = "4.8.0";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/ethereum",
3
- "version": "4.7.1",
3
+ "version": "4.8.0",
4
4
  "description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -23,15 +23,15 @@
23
23
  "@walletconnect/types": "2.18.0",
24
24
  "eventemitter3": "5.0.1",
25
25
  "buffer": "6.0.3",
26
- "@metamask/sdk": "0.30.1",
27
- "@dynamic-labs/assert-package-version": "4.7.1",
28
- "@dynamic-labs/embedded-wallet-evm": "4.7.1",
29
- "@dynamic-labs/ethereum-core": "4.7.1",
30
- "@dynamic-labs/logger": "4.7.1",
31
- "@dynamic-labs/types": "4.7.1",
32
- "@dynamic-labs/utils": "4.7.1",
33
- "@dynamic-labs/wallet-book": "4.7.1",
34
- "@dynamic-labs/wallet-connector-core": "4.7.1"
26
+ "@metamask/sdk": "0.32.0",
27
+ "@dynamic-labs/assert-package-version": "4.8.0",
28
+ "@dynamic-labs/embedded-wallet-evm": "4.8.0",
29
+ "@dynamic-labs/ethereum-core": "4.8.0",
30
+ "@dynamic-labs/logger": "4.8.0",
31
+ "@dynamic-labs/types": "4.8.0",
32
+ "@dynamic-labs/utils": "4.8.0",
33
+ "@dynamic-labs/wallet-book": "4.8.0",
34
+ "@dynamic-labs/wallet-connector-core": "4.8.0"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "viem": "^2.21.55"
@@ -206,15 +206,18 @@ class WalletConnect extends ethereumCore.EthereumWalletConnector {
206
206
  }
207
207
  refreshSession() {
208
208
  return _tslib.__awaiter(this, void 0, void 0, function* () {
209
- var _a, _b, _c, _d, _e;
209
+ var _a, _b, _c, _d, _e, _f;
210
210
  walletConnectorCore.logger.debug('refreshSession was called', this.name);
211
- if ((_b = (_a = WalletConnect.provider) === null || _a === void 0 ? void 0 : _a.session) === null || _b === void 0 ? void 0 : _b.topic) {
212
- if (localStorage.getItem(this.sessionTopicKey) ===
211
+ if (!((_b = (_a = WalletConnect.provider) === null || _a === void 0 ? void 0 : _a.session) === null || _b === void 0 ? void 0 : _b.topic) ||
212
+ localStorage.getItem(this.sessionTopicKey) !==
213
213
  ((_d = (_c = WalletConnect.provider) === null || _c === void 0 ? void 0 : _c.session) === null || _d === void 0 ? void 0 : _d.topic)) {
214
- this.session = WalletConnect.provider.session;
215
- this.setActiveAccount(((_e = localStorage.getItem(this.activeAccountKey)) !== null && _e !== void 0 ? _e : undefined));
216
- }
214
+ const chain = (_e = this.getMappedChainsByPreferredOrder()) === null || _e === void 0 ? void 0 : _e[0];
215
+ walletConnectorCore.logger.debug('provider is not connected, skipping refreshSession, just setting the default chain', chain);
216
+ this.currentChainId = chain;
217
+ return;
217
218
  }
219
+ this.session = WalletConnect.provider.session;
220
+ this.setActiveAccount(((_f = localStorage.getItem(this.activeAccountKey)) !== null && _f !== void 0 ? _f : undefined));
218
221
  const walletClient = this.getWalletClient();
219
222
  const walletChainId = yield walletClient.getChainId();
220
223
  walletConnectorCore.logger.debug('checking selected chain in refreshSession', this.name, walletChainId, this.currentChainId);
@@ -197,15 +197,18 @@ class WalletConnect extends EthereumWalletConnector {
197
197
  }
198
198
  refreshSession() {
199
199
  return __awaiter(this, void 0, void 0, function* () {
200
- var _a, _b, _c, _d, _e;
200
+ var _a, _b, _c, _d, _e, _f;
201
201
  logger.debug('refreshSession was called', this.name);
202
- if ((_b = (_a = WalletConnect.provider) === null || _a === void 0 ? void 0 : _a.session) === null || _b === void 0 ? void 0 : _b.topic) {
203
- if (localStorage.getItem(this.sessionTopicKey) ===
202
+ if (!((_b = (_a = WalletConnect.provider) === null || _a === void 0 ? void 0 : _a.session) === null || _b === void 0 ? void 0 : _b.topic) ||
203
+ localStorage.getItem(this.sessionTopicKey) !==
204
204
  ((_d = (_c = WalletConnect.provider) === null || _c === void 0 ? void 0 : _c.session) === null || _d === void 0 ? void 0 : _d.topic)) {
205
- this.session = WalletConnect.provider.session;
206
- this.setActiveAccount(((_e = localStorage.getItem(this.activeAccountKey)) !== null && _e !== void 0 ? _e : undefined));
207
- }
205
+ const chain = (_e = this.getMappedChainsByPreferredOrder()) === null || _e === void 0 ? void 0 : _e[0];
206
+ logger.debug('provider is not connected, skipping refreshSession, just setting the default chain', chain);
207
+ this.currentChainId = chain;
208
+ return;
208
209
  }
210
+ this.session = WalletConnect.provider.session;
211
+ this.setActiveAccount(((_f = localStorage.getItem(this.activeAccountKey)) !== null && _f !== void 0 ? _f : undefined));
209
212
  const walletClient = this.getWalletClient();
210
213
  const walletChainId = yield walletClient.getChainId();
211
214
  logger.debug('checking selected chain in refreshSession', this.name, walletChainId, this.currentChainId);