@dynamic-labs/ethereum 4.9.2 → 4.9.4

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.9.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.3...v4.9.4) (2025-03-17)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * **logger:** don't try to store data if localStorage is not available ([#8309](https://github.com/dynamic-labs/dynamic-auth/issues/8309)) ([30164c7](https://github.com/dynamic-labs/dynamic-auth/commit/30164c7de7bbf1463c6f6a7c12c4b60b5cfb6e78))
8
+ * modal corners ([#8308](https://github.com/dynamic-labs/dynamic-auth/issues/8308)) ([2d21d87](https://github.com/dynamic-labs/dynamic-auth/commit/2d21d87466cee4ab3b981b24fa15f5c321b163f5))
9
+
10
+ ### [4.9.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.2...v4.9.3) (2025-03-14)
11
+
12
+
13
+ ### Features
14
+
15
+ * allow adding extra text to ToS and PP footer using custom css ([#8290](https://github.com/dynamic-labs/dynamic-auth/issues/8290)) ([0f6eb26](https://github.com/dynamic-labs/dynamic-auth/commit/0f6eb2666ea93a32360710ba5ac14eac53e07e2d))
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * log out if there is a mismatch in user and wallet state ([#8300](https://github.com/dynamic-labs/dynamic-auth/issues/8300)) ([82ec2ad](https://github.com/dynamic-labs/dynamic-auth/commit/82ec2add1682a576d00dfe13aa1b9cccecf96688))
21
+ * sol sponsored tx for v3 ([#8288](https://github.com/dynamic-labs/dynamic-auth/issues/8288)) ([c466fba](https://github.com/dynamic-labs/dynamic-auth/commit/c466fba417d39641631e29104ec9c156dfdf7647))
22
+ * v3 existing wallet could not log in again ([#8282](https://github.com/dynamic-labs/dynamic-auth/issues/8282)) ([c2d68ad](https://github.com/dynamic-labs/dynamic-auth/commit/c2d68adf575fcce371e438076184ef590f346c9f))
23
+
2
24
  ### [4.9.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.1...v4.9.2) (2025-03-12)
3
25
 
4
26
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.9.2";
6
+ var version = "4.9.4";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.9.2";
2
+ var version = "4.9.4";
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.9.2",
3
+ "version": "4.9.4",
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
  "eventemitter3": "5.0.1",
24
24
  "buffer": "6.0.3",
25
25
  "@metamask/sdk": "0.32.0",
26
- "@dynamic-labs/assert-package-version": "4.9.2",
27
- "@dynamic-labs/embedded-wallet-evm": "4.9.2",
28
- "@dynamic-labs/ethereum-core": "4.9.2",
29
- "@dynamic-labs/logger": "4.9.2",
30
- "@dynamic-labs/rpc-providers": "4.9.2",
31
- "@dynamic-labs/types": "4.9.2",
32
- "@dynamic-labs/utils": "4.9.2",
33
- "@dynamic-labs/wallet-book": "4.9.2",
34
- "@dynamic-labs/wallet-connector-core": "4.9.2"
26
+ "@dynamic-labs/assert-package-version": "4.9.4",
27
+ "@dynamic-labs/embedded-wallet-evm": "4.9.4",
28
+ "@dynamic-labs/ethereum-core": "4.9.4",
29
+ "@dynamic-labs/logger": "4.9.4",
30
+ "@dynamic-labs/rpc-providers": "4.9.4",
31
+ "@dynamic-labs/types": "4.9.4",
32
+ "@dynamic-labs/utils": "4.9.4",
33
+ "@dynamic-labs/wallet-book": "4.9.4",
34
+ "@dynamic-labs/wallet-connector-core": "4.9.4"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "viem": "^2.21.55"
@@ -113,8 +113,19 @@ WalletConnectProvider.connect = (_b) => _tslib.__awaiter(void 0, [_b], void 0, f
113
113
  }
114
114
  catch (error) {
115
115
  logger.logger.error('[WalletConnectProvider] Failed to connect to WalletConnect', error);
116
- const customError = new utils.DynamicError('Connection rejected. Please try again.');
117
- customError.code = 'connection_rejected';
116
+ if (typeof error !== 'object' ||
117
+ error === null ||
118
+ !('message' in error) ||
119
+ typeof error.message !== 'string') {
120
+ throw error;
121
+ }
122
+ const customError = new utils.DynamicError(error.message);
123
+ if (error.message.includes('rejected')) {
124
+ customError.code = utils.ErrorCode.CONNECTION_REJECTED;
125
+ }
126
+ else if (error.message.includes('expired')) {
127
+ customError.code = utils.ErrorCode.CONNECTION_PROPOSAL_EXPIRED;
128
+ }
118
129
  throw customError;
119
130
  }
120
131
  finally {
@@ -2,7 +2,7 @@
2
2
  import { __awaiter } from '../../../_virtual/_tslib.js';
3
3
  import EthereumProvider from '@walletconnect/ethereum-provider';
4
4
  import { performPlatformSpecificConnectionMethod } from '@dynamic-labs/wallet-connector-core';
5
- import { parseIntSafe, DynamicError } from '@dynamic-labs/utils';
5
+ import { parseIntSafe, DynamicError, ErrorCode } from '@dynamic-labs/utils';
6
6
  import { logger } from '../../utils/logger.js';
7
7
 
8
8
  var _a;
@@ -105,8 +105,19 @@ WalletConnectProvider.connect = (_b) => __awaiter(void 0, [_b], void 0, function
105
105
  }
106
106
  catch (error) {
107
107
  logger.error('[WalletConnectProvider] Failed to connect to WalletConnect', error);
108
- const customError = new DynamicError('Connection rejected. Please try again.');
109
- customError.code = 'connection_rejected';
108
+ if (typeof error !== 'object' ||
109
+ error === null ||
110
+ !('message' in error) ||
111
+ typeof error.message !== 'string') {
112
+ throw error;
113
+ }
114
+ const customError = new DynamicError(error.message);
115
+ if (error.message.includes('rejected')) {
116
+ customError.code = ErrorCode.CONNECTION_REJECTED;
117
+ }
118
+ else if (error.message.includes('expired')) {
119
+ customError.code = ErrorCode.CONNECTION_PROPOSAL_EXPIRED;
120
+ }
110
121
  throw customError;
111
122
  }
112
123
  finally {