@dynamic-labs/ethereum 4.7.0 → 4.7.2

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,23 @@
1
1
 
2
+ ### [4.7.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.7.1...v4.7.2) (2025-02-22)
3
+
4
+ ### Features
5
+
6
+ * add bitcoin rune support for token balances ([95640](https://github.com/dynamic-labs/dynamic-auth/commit/956403dc0e427e9a99c62e189fc59de0d8b11e1b))
7
+
8
+ ### Bug Fixes
9
+
10
+ * 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))
11
+ * 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))
12
+ * upgrade elliptic ([#8106](https://github.com/dynamic-labs/dynamic-auth/issues/8106)) ([359c873](https://github.com/dynamic-labs/dynamic-auth/commit/359c8733fdd8c0510c2f0018ee0fefa337847aae))
13
+
14
+ ### [4.7.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.7.0...v4.7.1) (2025-02-20)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * remove user logout when sdk version change ([#8112](https://github.com/dynamic-labs/dynamic-auth/issues/8112)) ([b1a321f](https://github.com/dynamic-labs/dynamic-auth/commit/b1a321f18231f083aeb365d4dc92e992897a7e1b))
20
+
2
21
  ## [4.7.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.6.3...v4.7.0) (2025-02-20)
3
22
 
4
23
 
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.0";
6
+ var version = "4.7.2";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.7.0";
2
+ var version = "4.7.2";
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.0",
3
+ "version": "4.7.2",
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.0",
28
- "@dynamic-labs/embedded-wallet-evm": "4.7.0",
29
- "@dynamic-labs/ethereum-core": "4.7.0",
30
- "@dynamic-labs/logger": "4.7.0",
31
- "@dynamic-labs/types": "4.7.0",
32
- "@dynamic-labs/utils": "4.7.0",
33
- "@dynamic-labs/wallet-book": "4.7.0",
34
- "@dynamic-labs/wallet-connector-core": "4.7.0"
26
+ "@metamask/sdk": "0.32.0",
27
+ "@dynamic-labs/assert-package-version": "4.7.2",
28
+ "@dynamic-labs/embedded-wallet-evm": "4.7.2",
29
+ "@dynamic-labs/ethereum-core": "4.7.2",
30
+ "@dynamic-labs/logger": "4.7.2",
31
+ "@dynamic-labs/types": "4.7.2",
32
+ "@dynamic-labs/utils": "4.7.2",
33
+ "@dynamic-labs/wallet-book": "4.7.2",
34
+ "@dynamic-labs/wallet-connector-core": "4.7.2"
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);