@dynamic-labs/ethereum 4.77.1 → 4.77.3

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,26 @@
1
1
 
2
+ ### [4.77.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.77.2...v4.77.3) (2026-04-18)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * **ton:** convert sendBalance amount to smallest units ([#10941](https://github.com/dynamic-labs/dynamic-auth/issues/10941)) ([5eac6be](https://github.com/dynamic-labs/dynamic-auth/commit/5eac6be1c3444525893e6e5e95ce65f6c9f9dea3))
8
+
9
+ ### [4.77.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.77.1...v4.77.2) (2026-04-16)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * add support for next 16 and dual-module-import breaking. ([#10926](https://github.com/dynamic-labs/dynamic-auth/issues/10926)) ([312c7b8](https://github.com/dynamic-labs/dynamic-auth/commit/312c7b83f7a39109c9a9950a6d45ea9a815dd800))
15
+ * **DYNT-399:** phantom btc missing public address ([#10914](https://github.com/dynamic-labs/dynamic-auth/issues/10914)) ([632ead1](https://github.com/dynamic-labs/dynamic-auth/commit/632ead1e3b500ff2e78915459d6764e4c4a49168))
16
+ * **playwright:** fix tests flakiness [DYNT-555] ([#10923](https://github.com/dynamic-labs/dynamic-auth/issues/10923)) ([6556884](https://github.com/dynamic-labs/dynamic-auth/commit/65568849580bb8549eb11a1c44fd22fbc56f624c))
17
+ * **playwright:** stabilize flaky tests (domain-access-control + embedded-wallet) DYNT-495 ([#10881](https://github.com/dynamic-labs/dynamic-auth/issues/10881)) ([4925e19](https://github.com/dynamic-labs/dynamic-auth/commit/4925e1903b5f6a37a550cb34ab900abff1cc9f23))
18
+ * remediate high-severity dependency vulnerabilities ([#10919](https://github.com/dynamic-labs/dynamic-auth/issues/10919)) ([7d7cfdd](https://github.com/dynamic-labs/dynamic-auth/commit/7d7cfdd162d9f7a3c8c2501d47b33ae8f4e4d26d))
19
+ * remediate high-severity dependency vulnerabilities ([#10925](https://github.com/dynamic-labs/dynamic-auth/issues/10925)) ([4039d25](https://github.com/dynamic-labs/dynamic-auth/commit/4039d25afea78c49999443caba65d42d4fc96c95))
20
+ * upgrade axios to 1.15.0 to fix CVE-2026-40175 ([#10918](https://github.com/dynamic-labs/dynamic-auth/issues/10918)) ([74751dc](https://github.com/dynamic-labs/dynamic-auth/commit/74751dcf4e7a918e39de2fb667ee6ead4a7a4602))
21
+ * **waas:** skip password prompt when wallet is not password-encrypted ([#10916](https://github.com/dynamic-labs/dynamic-auth/issues/10916)) ([e3dd403](https://github.com/dynamic-labs/dynamic-auth/commit/e3dd4035c447106d40baa5e7e12fa35fafa0808f))
22
+ * **walletconnect:** improve error logging and handle empty network configs ([#10897](https://github.com/dynamic-labs/dynamic-auth/issues/10897)) ([bea7a9f](https://github.com/dynamic-labs/dynamic-auth/commit/bea7a9fd4628e4fbca554f8eed4a0dc097fab83b))
23
+
2
24
  ### [4.77.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.77.0...v4.77.1) (2026-04-10)
3
25
 
4
26
  ### Bug Fixes
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.77.1";
6
+ var version = "4.77.3";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.77.1";
2
+ var version = "4.77.3";
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.77.1",
3
+ "version": "4.77.3",
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",
@@ -24,16 +24,16 @@
24
24
  "eventemitter3": "5.0.1",
25
25
  "buffer": "6.0.3",
26
26
  "@metamask/sdk": "0.33.0",
27
- "@dynamic-labs/assert-package-version": "4.77.1",
28
- "@dynamic-labs/embedded-wallet-evm": "4.77.1",
29
- "@dynamic-labs/ethereum-core": "4.77.1",
30
- "@dynamic-labs/logger": "4.77.1",
31
- "@dynamic-labs/rpc-providers": "4.77.1",
32
- "@dynamic-labs/types": "4.77.1",
33
- "@dynamic-labs/utils": "4.77.1",
34
- "@dynamic-labs/waas-evm": "4.77.1",
35
- "@dynamic-labs/wallet-book": "4.77.1",
36
- "@dynamic-labs/wallet-connector-core": "4.77.1"
27
+ "@dynamic-labs/assert-package-version": "4.77.3",
28
+ "@dynamic-labs/embedded-wallet-evm": "4.77.3",
29
+ "@dynamic-labs/ethereum-core": "4.77.3",
30
+ "@dynamic-labs/logger": "4.77.3",
31
+ "@dynamic-labs/rpc-providers": "4.77.3",
32
+ "@dynamic-labs/types": "4.77.3",
33
+ "@dynamic-labs/utils": "4.77.3",
34
+ "@dynamic-labs/waas-evm": "4.77.3",
35
+ "@dynamic-labs/wallet-book": "4.77.3",
36
+ "@dynamic-labs/wallet-connector-core": "4.77.3"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "viem": "^2.45.3"
@@ -140,9 +140,11 @@ class WalletConnectConnector extends ethereumCore.EthereumWalletConnector {
140
140
  provider,
141
141
  });
142
142
  const addresses = yield WalletConnectProvider.WalletConnectProvider.connect({
143
+ chainId: this.currentChainId,
143
144
  connectionOpts: opts,
144
145
  deepLinkPreference: this.deepLinkPreference,
145
146
  deepLinks: this.metadata.deepLinks,
147
+ walletName: this.name,
146
148
  });
147
149
  walletConnectorCore.logger.debug('[WalletConnect] getAddress - connection result', addresses);
148
150
  const address = addresses === null || addresses === void 0 ? void 0 : addresses[0];
@@ -136,9 +136,11 @@ class WalletConnectConnector extends EthereumWalletConnector {
136
136
  provider,
137
137
  });
138
138
  const addresses = yield WalletConnectProvider.connect({
139
+ chainId: this.currentChainId,
139
140
  connectionOpts: opts,
140
141
  deepLinkPreference: this.deepLinkPreference,
141
142
  deepLinks: this.metadata.deepLinks,
143
+ walletName: this.name,
142
144
  });
143
145
  logger.debug('[WalletConnect] getAddress - connection result', addresses);
144
146
  const address = addresses === null || addresses === void 0 ? void 0 : addresses[0];
@@ -52,6 +52,12 @@ WalletConnectProvider.init = (...args_1) => _tslib.__awaiter(void 0, [...args_1]
52
52
  }
53
53
  _a.isInitializing = true;
54
54
  logger.logger.debug('[WalletConnectProvider] initializing');
55
+ const optionalChains = _a.getMappedChainsByPreferredOrder();
56
+ if (optionalChains.length === 0) {
57
+ logger.logger.debug('[WalletConnectProvider] skipping init - no EVM networks configured');
58
+ _a.isInitializing = false;
59
+ return;
60
+ }
55
61
  const redirectMetadata = {};
56
62
  if (_a.redirectNative) {
57
63
  redirectMetadata.native = _a.redirectNative;
@@ -76,7 +82,7 @@ WalletConnectProvider.init = (...args_1) => _tslib.__awaiter(void 0, [...args_1]
76
82
  customStoragePrefix: storePrefix,
77
83
  disableProviderPing: true,
78
84
  metadata,
79
- optionalChains: _a.getMappedChainsByPreferredOrder(),
85
+ optionalChains: optionalChains,
80
86
  optionalEvents: ['chainChanged', 'accountsChanged'],
81
87
  optionalMethods: [
82
88
  'eth_chainId',
@@ -103,7 +109,7 @@ WalletConnectProvider.init = (...args_1) => _tslib.__awaiter(void 0, [...args_1]
103
109
  * Connects to a wallet. This method should be called whenever a new wallet connection is needed.
104
110
  * If the wallet is already connected when the page is refreshed, this method does not need to be called.
105
111
  */
106
- WalletConnectProvider.connect = (_b) => _tslib.__awaiter(void 0, [_b], void 0, function* ({ deepLinks, deepLinkPreference, connectionOpts, }) {
112
+ WalletConnectProvider.connect = (_b) => _tslib.__awaiter(void 0, [_b], void 0, function* ({ deepLinks, deepLinkPreference, connectionOpts, walletName, chainId, }) {
107
113
  const handleDisplayURI = (uri) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
108
114
  var _c;
109
115
  logger.logger.debug('[WalletConnectProvider] handleDisplayURI', uri);
@@ -136,19 +142,29 @@ WalletConnectProvider.connect = (_b) => _tslib.__awaiter(void 0, [_b], void 0, f
136
142
  return result;
137
143
  }
138
144
  catch (error) {
139
- logger.logger.error('[WalletConnectProvider] Failed to connect to WalletConnect', error);
140
145
  if (typeof error !== 'object' ||
141
146
  error === null ||
142
147
  !('message' in error) ||
143
148
  typeof error.message !== 'string') {
149
+ logger.logger.error('[WalletConnectProvider] Failed to connect to WalletConnect', { chainId, error, walletName });
144
150
  throw error;
145
151
  }
146
152
  const customError = new utils.DynamicError(error.message);
153
+ const logContext = {
154
+ chainId,
155
+ errorMessage: error.message,
156
+ walletName,
157
+ };
147
158
  if (error.message.includes('rejected')) {
148
159
  customError.code = utils.ErrorCode.CONNECTION_REJECTED;
160
+ logger.logger.debug('[WalletConnectProvider] connection rejected by user', Object.assign(Object.assign({}, logContext), { errorCode: utils.ErrorCode.CONNECTION_REJECTED }));
149
161
  }
150
162
  else if (error.message.includes('expired')) {
151
163
  customError.code = utils.ErrorCode.CONNECTION_PROPOSAL_EXPIRED;
164
+ logger.logger.debug('[WalletConnectProvider] connection proposal expired', Object.assign(Object.assign({}, logContext), { errorCode: utils.ErrorCode.CONNECTION_PROPOSAL_EXPIRED }));
165
+ }
166
+ else {
167
+ logger.logger.error('[WalletConnectProvider] Failed to connect to WalletConnect', Object.assign(Object.assign({}, logContext), { errorCode: utils.ErrorCode.DEFAULT }));
152
168
  }
153
169
  throw customError;
154
170
  }
@@ -172,7 +188,9 @@ WalletConnectProvider.disconnect = () => _tslib.__awaiter(void 0, void 0, void 0
172
188
  yield _a.provider.disconnect();
173
189
  }
174
190
  catch (error) {
175
- logger.logger.error('[WalletConnectProvider] Failed to disconnect from WalletConnect', error);
191
+ logger.logger.warn('[WalletConnectProvider] Failed to disconnect from WalletConnect', {
192
+ errorMessage: error instanceof Error ? error.message : String(error),
193
+ });
176
194
  }
177
195
  });
178
196
  /**
@@ -44,10 +44,12 @@ export declare class WalletConnectProvider {
44
44
  * Connects to a wallet. This method should be called whenever a new wallet connection is needed.
45
45
  * If the wallet is already connected when the page is refreshed, this method does not need to be called.
46
46
  */
47
- static connect: ({ deepLinks, deepLinkPreference, connectionOpts, }: {
47
+ static connect: ({ deepLinks, deepLinkPreference, connectionOpts, walletName, chainId, }: {
48
48
  deepLinks?: WalletDeepLinks;
49
49
  deepLinkPreference: DeepLinkVariant;
50
50
  connectionOpts?: GetAddressOpts;
51
+ walletName?: string;
52
+ chainId?: number;
51
53
  }) => Promise<ProviderAccounts | undefined>;
52
54
  /**
53
55
  * Disconnects from a wallet. This method should be called whenever we need to disconnect from a wallet.
@@ -44,6 +44,12 @@ WalletConnectProvider.init = (...args_1) => __awaiter(void 0, [...args_1], void
44
44
  }
45
45
  _a.isInitializing = true;
46
46
  logger.debug('[WalletConnectProvider] initializing');
47
+ const optionalChains = _a.getMappedChainsByPreferredOrder();
48
+ if (optionalChains.length === 0) {
49
+ logger.debug('[WalletConnectProvider] skipping init - no EVM networks configured');
50
+ _a.isInitializing = false;
51
+ return;
52
+ }
47
53
  const redirectMetadata = {};
48
54
  if (_a.redirectNative) {
49
55
  redirectMetadata.native = _a.redirectNative;
@@ -68,7 +74,7 @@ WalletConnectProvider.init = (...args_1) => __awaiter(void 0, [...args_1], void
68
74
  customStoragePrefix: storePrefix,
69
75
  disableProviderPing: true,
70
76
  metadata,
71
- optionalChains: _a.getMappedChainsByPreferredOrder(),
77
+ optionalChains: optionalChains,
72
78
  optionalEvents: ['chainChanged', 'accountsChanged'],
73
79
  optionalMethods: [
74
80
  'eth_chainId',
@@ -95,7 +101,7 @@ WalletConnectProvider.init = (...args_1) => __awaiter(void 0, [...args_1], void
95
101
  * Connects to a wallet. This method should be called whenever a new wallet connection is needed.
96
102
  * If the wallet is already connected when the page is refreshed, this method does not need to be called.
97
103
  */
98
- WalletConnectProvider.connect = (_b) => __awaiter(void 0, [_b], void 0, function* ({ deepLinks, deepLinkPreference, connectionOpts, }) {
104
+ WalletConnectProvider.connect = (_b) => __awaiter(void 0, [_b], void 0, function* ({ deepLinks, deepLinkPreference, connectionOpts, walletName, chainId, }) {
99
105
  const handleDisplayURI = (uri) => __awaiter(void 0, void 0, void 0, function* () {
100
106
  var _c;
101
107
  logger.debug('[WalletConnectProvider] handleDisplayURI', uri);
@@ -128,19 +134,29 @@ WalletConnectProvider.connect = (_b) => __awaiter(void 0, [_b], void 0, function
128
134
  return result;
129
135
  }
130
136
  catch (error) {
131
- logger.error('[WalletConnectProvider] Failed to connect to WalletConnect', error);
132
137
  if (typeof error !== 'object' ||
133
138
  error === null ||
134
139
  !('message' in error) ||
135
140
  typeof error.message !== 'string') {
141
+ logger.error('[WalletConnectProvider] Failed to connect to WalletConnect', { chainId, error, walletName });
136
142
  throw error;
137
143
  }
138
144
  const customError = new DynamicError(error.message);
145
+ const logContext = {
146
+ chainId,
147
+ errorMessage: error.message,
148
+ walletName,
149
+ };
139
150
  if (error.message.includes('rejected')) {
140
151
  customError.code = ErrorCode.CONNECTION_REJECTED;
152
+ logger.debug('[WalletConnectProvider] connection rejected by user', Object.assign(Object.assign({}, logContext), { errorCode: ErrorCode.CONNECTION_REJECTED }));
141
153
  }
142
154
  else if (error.message.includes('expired')) {
143
155
  customError.code = ErrorCode.CONNECTION_PROPOSAL_EXPIRED;
156
+ logger.debug('[WalletConnectProvider] connection proposal expired', Object.assign(Object.assign({}, logContext), { errorCode: ErrorCode.CONNECTION_PROPOSAL_EXPIRED }));
157
+ }
158
+ else {
159
+ logger.error('[WalletConnectProvider] Failed to connect to WalletConnect', Object.assign(Object.assign({}, logContext), { errorCode: ErrorCode.DEFAULT }));
144
160
  }
145
161
  throw customError;
146
162
  }
@@ -164,7 +180,9 @@ WalletConnectProvider.disconnect = () => __awaiter(void 0, void 0, void 0, funct
164
180
  yield _a.provider.disconnect();
165
181
  }
166
182
  catch (error) {
167
- logger.error('[WalletConnectProvider] Failed to disconnect from WalletConnect', error);
183
+ logger.warn('[WalletConnectProvider] Failed to disconnect from WalletConnect', {
184
+ errorMessage: error instanceof Error ? error.message : String(error),
185
+ });
168
186
  }
169
187
  });
170
188
  /**