@dynamic-labs/ethereum-aa 4.7.2 → 4.8.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
@@ -1,4 +1,25 @@
1
1
 
2
+ ### [4.8.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.8.0...v4.8.1) (2025-02-25)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * wc redirect for safari inside iframe ([#8131](https://github.com/dynamic-labs/dynamic-auth/issues/8131)) ([8c74bea](https://github.com/dynamic-labs/dynamic-auth/commit/8c74beae505014eb85be4fd211909709d0a339dd))
8
+
9
+ ## [4.8.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.7.2...v4.8.0) (2025-02-25)
10
+
11
+
12
+ ### Features
13
+
14
+ * 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))
15
+ * 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))
16
+ * **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))
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * 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))
22
+
2
23
  ### [4.7.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.7.1...v4.7.2) (2025-02-22)
3
24
 
4
25
  ### Features
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.2";
6
+ var version = "4.8.1";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.7.2";
2
+ var version = "4.8.1";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/ethereum-aa",
3
- "version": "4.7.2",
3
+ "version": "4.8.1",
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",
@@ -22,13 +22,13 @@
22
22
  "@zerodev/ecdsa-validator": "5.4.4",
23
23
  "@zerodev/multi-chain-ecdsa-validator": "5.4.3",
24
24
  "@zerodev/sdk": "5.4.21",
25
- "@dynamic-labs/assert-package-version": "4.7.2",
26
- "@dynamic-labs/ethereum-core": "4.7.2",
27
- "@dynamic-labs/logger": "4.7.2",
28
- "@dynamic-labs/types": "4.7.2",
29
- "@dynamic-labs/utils": "4.7.2",
30
- "@dynamic-labs/wallet-book": "4.7.2",
31
- "@dynamic-labs/wallet-connector-core": "4.7.2"
25
+ "@dynamic-labs/assert-package-version": "4.8.1",
26
+ "@dynamic-labs/ethereum-core": "4.8.1",
27
+ "@dynamic-labs/logger": "4.8.1",
28
+ "@dynamic-labs/types": "4.8.1",
29
+ "@dynamic-labs/utils": "4.8.1",
30
+ "@dynamic-labs/wallet-book": "4.8.1",
31
+ "@dynamic-labs/wallet-connector-core": "4.8.1"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "viem": "^2.21.55"
@@ -7,15 +7,17 @@ var _tslib = require('../../_virtual/_tslib.cjs');
7
7
  var ethereumCore = require('@dynamic-labs/ethereum-core');
8
8
  var logger = require('./logger.cjs');
9
9
 
10
- const cachedChainIdKey = 'dynamic_zd_chain_id';
10
+ const CACHED_CHAIN_ID_KEY = 'dynamic_zd_chain_id';
11
+ const getCachedChainIdKey = (projectId) => `${CACHED_CHAIN_ID_KEY}-${projectId}`;
11
12
  const fetchZeroDevChain = (projectId) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
12
13
  try {
13
- const cachedChainId = localStorage.getItem(cachedChainIdKey);
14
+ const cacheKey = getCachedChainIdKey(projectId);
15
+ const cachedChainId = localStorage.getItem(cacheKey);
14
16
  if (cachedChainId) {
15
17
  return ethereumCore.chainsMap[cachedChainId];
16
18
  }
17
19
  const response = yield (yield fetch(`https://prod-api.zerodev.app/projects/${projectId}`)).json();
18
- localStorage.setItem(cachedChainIdKey, response.chainId);
20
+ localStorage.setItem(cacheKey, response.chainId);
19
21
  return ethereumCore.chainsMap[response.chainId];
20
22
  }
21
23
  catch (err) {
@@ -25,5 +27,5 @@ const fetchZeroDevChain = (projectId) => _tslib.__awaiter(void 0, void 0, void 0
25
27
  }
26
28
  });
27
29
 
28
- exports.cachedChainIdKey = cachedChainIdKey;
29
30
  exports.fetchZeroDevChain = fetchZeroDevChain;
31
+ exports.getCachedChainIdKey = getCachedChainIdKey;
@@ -1,3 +1,3 @@
1
1
  import { type Chain } from 'viem/chains';
2
- export declare const cachedChainIdKey = "dynamic_zd_chain_id";
2
+ export declare const getCachedChainIdKey: (projectId: string) => string;
3
3
  export declare const fetchZeroDevChain: (projectId: string) => Promise<Chain>;
@@ -3,15 +3,17 @@ import { __awaiter } from '../../_virtual/_tslib.js';
3
3
  import { chainsMap } from '@dynamic-labs/ethereum-core';
4
4
  import { logger } from './logger.js';
5
5
 
6
- const cachedChainIdKey = 'dynamic_zd_chain_id';
6
+ const CACHED_CHAIN_ID_KEY = 'dynamic_zd_chain_id';
7
+ const getCachedChainIdKey = (projectId) => `${CACHED_CHAIN_ID_KEY}-${projectId}`;
7
8
  const fetchZeroDevChain = (projectId) => __awaiter(void 0, void 0, void 0, function* () {
8
9
  try {
9
- const cachedChainId = localStorage.getItem(cachedChainIdKey);
10
+ const cacheKey = getCachedChainIdKey(projectId);
11
+ const cachedChainId = localStorage.getItem(cacheKey);
10
12
  if (cachedChainId) {
11
13
  return chainsMap[cachedChainId];
12
14
  }
13
15
  const response = yield (yield fetch(`https://prod-api.zerodev.app/projects/${projectId}`)).json();
14
- localStorage.setItem(cachedChainIdKey, response.chainId);
16
+ localStorage.setItem(cacheKey, response.chainId);
15
17
  return chainsMap[response.chainId];
16
18
  }
17
19
  catch (err) {
@@ -21,4 +23,4 @@ const fetchZeroDevChain = (projectId) => __awaiter(void 0, void 0, void 0, funct
21
23
  }
22
24
  });
23
25
 
24
- export { cachedChainIdKey, fetchZeroDevChain };
26
+ export { fetchZeroDevChain, getCachedChainIdKey };