@dynamic-labs/ethereum 5.7.0 → 5.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,18 @@
1
1
 
2
+ ## [5.8.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.7.0...v5.8.0) (2026-09-09)
3
+
4
+
5
+ ### Features
6
+
7
+ * **solana-core:** standalone sponsored ATA creation ([#12365](https://github.com/dynamic-labs/dynamic-auth/issues/12365)) ([ac2e776](https://github.com/dynamic-labs/dynamic-auth/commit/ac2e7769fcf91c868e961a227b8acb6347bf3f13))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * do not report wallets installed from a provider selection router ([#12340](https://github.com/dynamic-labs/dynamic-auth/issues/12340)) ([dac5546](https://github.com/dynamic-labs/dynamic-auth/commit/dac5546edf6004c37bd84dd2089d94952949230b))
13
+ * **screening:** soften the blocked-wallet copy to be provider-neutral ([#12358](https://github.com/dynamic-labs/dynamic-auth/issues/12358)) ([b4854d8](https://github.com/dynamic-labs/dynamic-auth/commit/b4854d88fa67f684be0e133edd5fd4a4bf5c7f37))
14
+ * show transaction amount when simulation returns no transfers ([#12355](https://github.com/dynamic-labs/dynamic-auth/issues/12355)) ([bfaf337](https://github.com/dynamic-labs/dynamic-auth/commit/bfaf337e5350970f71255baff065e0cdbccdc7ca))
15
+
2
16
  ## [5.7.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.6.1...v5.7.0) (2026-09-08)
3
17
 
4
18
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "5.7.0";
6
+ var version = "5.8.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "5.7.0";
2
+ var version = "5.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": "5.7.0",
3
+ "version": "5.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",
@@ -19,20 +19,20 @@
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
21
  "@coinbase/wallet-sdk": "4.3.7",
22
- "@dynamic-labs-connectors/base-account-evm": "4.6.16",
23
- "@dynamic-labs-connectors/metamask-evm": "4.6.16",
22
+ "@dynamic-labs-connectors/base-account-evm": "4.7.1",
23
+ "@dynamic-labs-connectors/metamask-evm": "4.7.1",
24
24
  "@walletconnect/ethereum-provider": "2.23.2",
25
25
  "eventemitter3": "5.0.1",
26
26
  "buffer": "6.0.3",
27
- "@dynamic-labs/assert-package-version": "5.7.0",
28
- "@dynamic-labs/ethereum-core": "5.7.0",
29
- "@dynamic-labs/logger": "5.7.0",
30
- "@dynamic-labs/rpc-providers": "5.7.0",
31
- "@dynamic-labs/types": "5.7.0",
32
- "@dynamic-labs/utils": "5.7.0",
33
- "@dynamic-labs/waas-evm": "5.7.0",
34
- "@dynamic-labs/wallet-book": "5.7.0",
35
- "@dynamic-labs/wallet-connector-core": "5.7.0"
27
+ "@dynamic-labs/assert-package-version": "5.8.0",
28
+ "@dynamic-labs/ethereum-core": "5.8.0",
29
+ "@dynamic-labs/logger": "5.8.0",
30
+ "@dynamic-labs/rpc-providers": "5.8.0",
31
+ "@dynamic-labs/types": "5.8.0",
32
+ "@dynamic-labs/utils": "5.8.0",
33
+ "@dynamic-labs/waas-evm": "5.8.0",
34
+ "@dynamic-labs/wallet-book": "5.8.0",
35
+ "@dynamic-labs/wallet-connector-core": "5.8.0"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "viem": "^2.45.3"
@@ -9,6 +9,7 @@ var ethereumCore = require('@dynamic-labs/ethereum-core');
9
9
  var utils = require('@dynamic-labs/utils');
10
10
  var walletBook = require('@dynamic-labs/wallet-book');
11
11
  var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
12
+ var isProviderSelectionRouter = require('./utils/isProviderSelectionRouter/isProviderSelectionRouter.cjs');
12
13
 
13
14
  class EthProviderHelper {
14
15
  constructor(connector) {
@@ -45,6 +46,7 @@ class EthProviderHelper {
45
46
  return injectedConfig === null || injectedConfig === void 0 ? void 0 : injectedConfig.find((c) => c.chain === 'evm');
46
47
  }
47
48
  installedProviders() {
49
+ var _a;
48
50
  const config = this.getInjectedConfig();
49
51
  if (!config)
50
52
  return [];
@@ -58,11 +60,12 @@ class EthProviderHelper {
58
60
  }
59
61
  const injectedEthereum = window.ethereum;
60
62
  if (injectedEthereum) {
61
- if (!injectedEthereum.providers || !injectedEthereum.providers.length) {
62
- providers.push(injectedEthereum);
63
+ const nestedProviders = (_a = injectedEthereum.providers) !== null && _a !== void 0 ? _a : [];
64
+ if (nestedProviders.length) {
65
+ nestedProviders.forEach((p) => providers.push(p));
63
66
  }
64
- else {
65
- injectedEthereum.providers.forEach((p) => providers.push(p));
67
+ else if (!isProviderSelectionRouter.isProviderSelectionRouter(injectedEthereum)) {
68
+ providers.push(injectedEthereum);
66
69
  }
67
70
  }
68
71
  return providers;
@@ -5,6 +5,7 @@ import { chainsMap, normalizeRpcError } from '@dynamic-labs/ethereum-core';
5
5
  import { getProvidersFromWindow, Eip6963ProviderSingleton } from '@dynamic-labs/utils';
6
6
  import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
7
7
  import { ProviderLookup, logger, eventListenerHandlers } from '@dynamic-labs/wallet-connector-core';
8
+ import { isProviderSelectionRouter } from './utils/isProviderSelectionRouter/isProviderSelectionRouter.js';
8
9
 
9
10
  class EthProviderHelper {
10
11
  constructor(connector) {
@@ -41,6 +42,7 @@ class EthProviderHelper {
41
42
  return injectedConfig === null || injectedConfig === void 0 ? void 0 : injectedConfig.find((c) => c.chain === 'evm');
42
43
  }
43
44
  installedProviders() {
45
+ var _a;
44
46
  const config = this.getInjectedConfig();
45
47
  if (!config)
46
48
  return [];
@@ -54,11 +56,12 @@ class EthProviderHelper {
54
56
  }
55
57
  const injectedEthereum = window.ethereum;
56
58
  if (injectedEthereum) {
57
- if (!injectedEthereum.providers || !injectedEthereum.providers.length) {
58
- providers.push(injectedEthereum);
59
+ const nestedProviders = (_a = injectedEthereum.providers) !== null && _a !== void 0 ? _a : [];
60
+ if (nestedProviders.length) {
61
+ nestedProviders.forEach((p) => providers.push(p));
59
62
  }
60
- else {
61
- injectedEthereum.providers.forEach((p) => providers.push(p));
63
+ else if (!isProviderSelectionRouter(injectedEthereum)) {
64
+ providers.push(injectedEthereum);
62
65
  }
63
66
  }
64
67
  return providers;
@@ -0,0 +1 @@
1
+ export { isProviderSelectionRouter } from './isProviderSelectionRouter';
@@ -0,0 +1,25 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ /**
7
+ * True when the injected provider is a router that collects the other injected
8
+ * providers and forwards requests to whichever extension the user picks, rather
9
+ * than belonging to a single wallet. Routers mirror MetaMask's identity flags,
10
+ * so matching a wallet's extension locators against one reports wallets that
11
+ * are not installed. Phantom injects such a router into `window.ethereum` when
12
+ * its EVM setting asks which wallet to use.
13
+ */
14
+ const isProviderSelectionRouter = (provider) => {
15
+ const isObject = typeof provider === 'object' && provider !== null;
16
+ if (!isObject) {
17
+ return false;
18
+ }
19
+ const candidate = provider;
20
+ const collectsOtherProviders = typeof candidate.addProvider === 'function';
21
+ const promptsForExtension = typeof candidate.selectExtension === 'function';
22
+ return collectsOtherProviders && promptsForExtension;
23
+ };
24
+
25
+ exports.isProviderSelectionRouter = isProviderSelectionRouter;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * True when the injected provider is a router that collects the other injected
3
+ * providers and forwards requests to whichever extension the user picks, rather
4
+ * than belonging to a single wallet. Routers mirror MetaMask's identity flags,
5
+ * so matching a wallet's extension locators against one reports wallets that
6
+ * are not installed. Phantom injects such a router into `window.ethereum` when
7
+ * its EVM setting asks which wallet to use.
8
+ */
9
+ export declare const isProviderSelectionRouter: (provider: unknown) => boolean;
@@ -0,0 +1,21 @@
1
+ 'use client'
2
+ /**
3
+ * True when the injected provider is a router that collects the other injected
4
+ * providers and forwards requests to whichever extension the user picks, rather
5
+ * than belonging to a single wallet. Routers mirror MetaMask's identity flags,
6
+ * so matching a wallet's extension locators against one reports wallets that
7
+ * are not installed. Phantom injects such a router into `window.ethereum` when
8
+ * its EVM setting asks which wallet to use.
9
+ */
10
+ const isProviderSelectionRouter = (provider) => {
11
+ const isObject = typeof provider === 'object' && provider !== null;
12
+ if (!isObject) {
13
+ return false;
14
+ }
15
+ const candidate = provider;
16
+ const collectsOtherProviders = typeof candidate.addProvider === 'function';
17
+ const promptsForExtension = typeof candidate.selectExtension === 'function';
18
+ return collectsOtherProviders && promptsForExtension;
19
+ };
20
+
21
+ export { isProviderSelectionRouter };