@dynamic-labs/ethereum 1.1.0-alpha.1 → 1.1.0-alpha.11

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,127 @@
1
1
 
2
+ ## [1.1.0-alpha.11](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.10...v1.1.0-alpha.11) (2024-01-17)
3
+
4
+
5
+ ### Features
6
+
7
+ * add Leather wallet and BtcKit connector ([#4335](https://github.com/dynamic-labs/DynamicAuth/issues/4335)) ([fe3316b](https://github.com/dynamic-labs/DynamicAuth/commit/fe3316b5be9ef17eea885e99cf925ccd0f271da7))
8
+ * add solana injected wallet configuration to walletbook ([#4375](https://github.com/dynamic-labs/DynamicAuth/issues/4375)) ([3677ce5](https://github.com/dynamic-labs/DynamicAuth/commit/3677ce5ff40d0c00bfaf0daa0d5d67bc40706ee0))
9
+ * add support for unisat wallet ([#4355](https://github.com/dynamic-labs/DynamicAuth/issues/4355)) ([5b7d6b0](https://github.com/dynamic-labs/DynamicAuth/commit/5b7d6b0a9ea84811a8252b3cdf30a3a8e410180c))
10
+ * add walletbook configurations for solana injected wallets ([#4360](https://github.com/dynamic-labs/DynamicAuth/issues/4360)) ([cdc8e5f](https://github.com/dynamic-labs/DynamicAuth/commit/cdc8e5f4878cb84e26e5b33299aa8547b84b6667))
11
+ * passkey renaming frontend ([#4331](https://github.com/dynamic-labs/DynamicAuth/issues/4331)) ([4551013](https://github.com/dynamic-labs/DynamicAuth/commit/4551013d577c914cb3aedfe458ab9eaa018aceb4))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * correctly update wallets connected flag after wallet switch ([#4397](https://github.com/dynamic-labs/DynamicAuth/issues/4397)) ([543a830](https://github.com/dynamic-labs/DynamicAuth/commit/543a830574f0d5a78fedbb9b18233e8dfbaddd86))
17
+ * export modal header ([#4401](https://github.com/dynamic-labs/DynamicAuth/issues/4401)) ([77cf016](https://github.com/dynamic-labs/DynamicAuth/commit/77cf016fc742458988864647870149a56e991ee4))
18
+ * trigger onAuthSuccess before embedded wallet creation ([4aa341a](https://github.com/dynamic-labs/DynamicAuth/commit/4aa341a1d08332a121daddb7c2dcb09a804a4de7))
19
+ * ui issues on react 17 ([#4373](https://github.com/dynamic-labs/DynamicAuth/issues/4373)) ([93096d6](https://github.com/dynamic-labs/DynamicAuth/commit/93096d6017816a4f0ed299bf618b130d90c81514))
20
+
21
+ ## [1.1.0-alpha.10](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.9...v1.1.0-alpha.10) (2024-01-06)
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * pass flow network to magic client ([#4322](https://github.com/dynamic-labs/DynamicAuth/issues/4322)) ([f3adccf](https://github.com/dynamic-labs/DynamicAuth/commit/f3adccf9f8d835f6b04e4767acd0fbd2ac238379))
27
+ * prevent error message when mobile wallet app is open ([#4301](https://github.com/dynamic-labs/DynamicAuth/issues/4301)) ([2a66dcf](https://github.com/dynamic-labs/DynamicAuth/commit/2a66dcfaf8100b3d910c559d35d8b731b1cb380e))
28
+ * turnkeyWalletConnector is not an email otp connector and uses dynamic otp ([#4313](https://github.com/dynamic-labs/DynamicAuth/issues/4313)) ([e4ea56f](https://github.com/dynamic-labs/DynamicAuth/commit/e4ea56f40fdf97b3f5440b016ebd95501089cebe))
29
+
30
+ ## [1.1.0-alpha.9](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.8...v1.1.0-alpha.9) (2024-01-04)
31
+
32
+
33
+ ### Features
34
+
35
+ * add solana magic support ([#4258](https://github.com/dynamic-labs/DynamicAuth/issues/4258)) ([da726aa](https://github.com/dynamic-labs/DynamicAuth/commit/da726aa78466c52ee3e1f18952e4351cde754cbc))
36
+
37
+
38
+ ### Bug Fixes
39
+
40
+ * edge case with unlinking wallet ([#4285](https://github.com/dynamic-labs/DynamicAuth/issues/4285)) ([1057fe4](https://github.com/dynamic-labs/DynamicAuth/commit/1057fe47599381f5d9dc39ce4cbeca2041c70319))
41
+ * remove normalizeWalletName from DynamicAuth ([5592817](https://github.com/dynamic-labs/DynamicAuth/commit/5592817b62e345319e04cca9a98276ffad87cfc2))
42
+ * **useFetchBalance:** ensure the latest wallet balance is fetched ([#4288](https://github.com/dynamic-labs/DynamicAuth/issues/4288)) ([25dd035](https://github.com/dynamic-labs/DynamicAuth/commit/25dd035cf8893b7cd28f550026134ba0eecda142))
43
+
44
+ ## [1.1.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.7...v1.1.0-alpha.8) (2024-01-03)
45
+
46
+
47
+ ### Features
48
+
49
+ * add new sdk view section for text ([#4280](https://github.com/dynamic-labs/DynamicAuth/issues/4280)) ([457ae38](https://github.com/dynamic-labs/DynamicAuth/commit/457ae38cd2be8dae078f40b54ffc4704299d4ed9))
50
+ * add new setShowLinkNewWalletModal method ([f46447a](https://github.com/dynamic-labs/DynamicAuth/commit/f46447ab606f4fdbf55e5fef21dd98f8f2650e90))
51
+ * add pk export for hd wallets ([#4266](https://github.com/dynamic-labs/DynamicAuth/issues/4266)) ([44aac69](https://github.com/dynamic-labs/DynamicAuth/commit/44aac69580ed44e66eab971f87cb6061a3fadc90))
52
+ * add starknet support for sopelia ([#4248](https://github.com/dynamic-labs/DynamicAuth/issues/4248)) ([f9a0980](https://github.com/dynamic-labs/DynamicAuth/commit/f9a0980c3cd2d6d95c5dd17b179fbd0931f08b1a))
53
+ * enable hardware wallet for solana wallets ([#4275](https://github.com/dynamic-labs/DynamicAuth/issues/4275)) ([704b380](https://github.com/dynamic-labs/DynamicAuth/commit/704b380186618a5a5793e88f36ccbe84b59a2e4a))
54
+
55
+
56
+ ### Bug Fixes
57
+
58
+ * phantom solana not connecting on mobile ([#4284](https://github.com/dynamic-labs/DynamicAuth/issues/4284)) ([6ad75f1](https://github.com/dynamic-labs/DynamicAuth/commit/6ad75f152896459f5cf658227f998c246b6a572b))
59
+ * use bitcoin payment address for onramp ([#4273](https://github.com/dynamic-labs/DynamicAuth/issues/4273)) ([a2f54e8](https://github.com/dynamic-labs/DynamicAuth/commit/a2f54e812a11a91ee488eca64f14b5eeea1a8874))
60
+
61
+ ## [1.1.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.6...v1.1.0-alpha.7) (2023-12-28)
62
+
63
+
64
+ ### Features
65
+
66
+ * better coinbase deeplinking ux ([#4164](https://github.com/dynamic-labs/DynamicAuth/issues/4164)) ([5252608](https://github.com/dynamic-labs/DynamicAuth/commit/525260851900a33a52f129def338963400344205))
67
+
68
+
69
+ ### Bug Fixes
70
+
71
+ * don't prompt for connect when selecting bitcoin wallet if already connected ([#4265](https://github.com/dynamic-labs/DynamicAuth/issues/4265)) ([adef402](https://github.com/dynamic-labs/DynamicAuth/commit/adef402ef94270a17fab896a8585a7f2eacd3681))
72
+
73
+ ## [1.1.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.5...v1.1.0-alpha.6) (2023-12-27)
74
+
75
+
76
+ ### Features
77
+
78
+ * add multi-wallet-prompts-widget ([#4166](https://github.com/dynamic-labs/DynamicAuth/issues/4166)) ([151e3d2](https://github.com/dynamic-labs/DynamicAuth/commit/151e3d2e7bebbf18448e4af8eecbf660f713cd3d))
79
+
80
+
81
+ ### Bug Fixes
82
+
83
+ * coinbase solana signMessage ([#4254](https://github.com/dynamic-labs/DynamicAuth/issues/4254)) ([f0300a9](https://github.com/dynamic-labs/DynamicAuth/commit/f0300a93ed6c9ba9dfab613820d8cedbe72abb87))
84
+ * make useConnectWithEmailOtp work cross views ([#4252](https://github.com/dynamic-labs/DynamicAuth/issues/4252)) ([a097119](https://github.com/dynamic-labs/DynamicAuth/commit/a097119556c38a22f338a783f79d512b99203cf5))
85
+
86
+ ## [1.1.0-alpha.5](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.4...v1.1.0-alpha.5) (2023-12-21)
87
+
88
+
89
+ ### Features
90
+
91
+ * add support for xverse wallet ([#4245](https://github.com/dynamic-labs/DynamicAuth/issues/4245)) ([7b68546](https://github.com/dynamic-labs/DynamicAuth/commit/7b6854684412007bcb33896555900936395176df))
92
+ * **gvty-526:** add embedded reveal ([#4233](https://github.com/dynamic-labs/DynamicAuth/issues/4233)) ([c2d0f90](https://github.com/dynamic-labs/DynamicAuth/commit/c2d0f903f4a4646f86c71834540fd49d51a4a7ae))
93
+
94
+ ## [1.1.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.3...v1.1.0-alpha.4) (2023-12-21)
95
+
96
+
97
+ ### Features
98
+
99
+ * add bitcoin integration ([#4216](https://github.com/dynamic-labs/DynamicAuth/issues/4216)) ([9584f1c](https://github.com/dynamic-labs/DynamicAuth/commit/9584f1cc3133835049ad1c53da980192263b8f21))
100
+ * add default footer to wallet list when tos and pp not enabled ([#4224](https://github.com/dynamic-labs/DynamicAuth/issues/4224)) ([0ad81c4](https://github.com/dynamic-labs/DynamicAuth/commit/0ad81c409bcb4aafb0dc565685525d620a95efce))
101
+ * adds useConnectWithEmailOtp ([#4234](https://github.com/dynamic-labs/DynamicAuth/issues/4234)) ([4a4e50a](https://github.com/dynamic-labs/DynamicAuth/commit/4a4e50ac8651c2a249d5125ae6bcf49aaf49be8c))
102
+
103
+ ## [1.1.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.2...v1.1.0-alpha.3) (2023-12-19)
104
+
105
+
106
+ ### Features
107
+
108
+ * add Flow support in magic wallet connector ([#4158](https://github.com/dynamic-labs/DynamicAuth/issues/4158)) ([fbbaea7](https://github.com/dynamic-labs/DynamicAuth/commit/fbbaea76b36ceb693f6bd4f2404dfa1204e61492))
109
+ * add showDynamicUserProfile to DynamicContext ([#4214](https://github.com/dynamic-labs/DynamicAuth/issues/4214)) ([2aeb8e3](https://github.com/dynamic-labs/DynamicAuth/commit/2aeb8e3c45a3d9f87bd9196ea9b46927e02eb633))
110
+
111
+
112
+ ### Bug Fixes
113
+
114
+ * add shortname to braveevm to allow for lookups by name as well as key ([#4213](https://github.com/dynamic-labs/DynamicAuth/issues/4213)) ([969b089](https://github.com/dynamic-labs/DynamicAuth/commit/969b089be516fb57fcdc941f908c078998eb4ec0))
115
+ * solflare connect ([#4215](https://github.com/dynamic-labs/DynamicAuth/issues/4215)) ([9a4164e](https://github.com/dynamic-labs/DynamicAuth/commit/9a4164e53198f33ef7201cd4e1eff745a09e9701))
116
+ * wagmi attempt to connect to primary wallet first ([#4206](https://github.com/dynamic-labs/DynamicAuth/issues/4206)) ([9e5fc8e](https://github.com/dynamic-labs/DynamicAuth/commit/9e5fc8ef026628935ac32d3bb0c22bda35057e5d))
117
+
118
+ ## [1.1.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.1...v1.1.0-alpha.2) (2023-12-18)
119
+
120
+
121
+ ### Bug Fixes
122
+
123
+ * increase timeout when fetching wallet network ([#4197](https://github.com/dynamic-labs/DynamicAuth/issues/4197)) ([bd43d45](https://github.com/dynamic-labs/DynamicAuth/commit/bd43d452dccf36f68bd012e5737480599b93c3b5))
124
+
2
125
  ## [1.1.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.0...v1.1.0-alpha.1) (2023-12-15)
3
126
 
4
127
  ## [1.1.0-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.14...v1.1.0-alpha.0) (2023-12-12)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/ethereum",
3
- "version": "1.1.0-alpha.1",
3
+ "version": "1.1.0-alpha.11",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -26,18 +26,18 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "dependencies": {
29
- "@coinbase/wallet-sdk": "3.7.2",
29
+ "@coinbase/wallet-sdk": "3.9.1",
30
30
  "@walletconnect/client": "1.8.0",
31
31
  "@walletconnect/ethereum-provider": "1.8.0",
32
32
  "@walletconnect/universal-provider": "2.10.6",
33
33
  "eventemitter3": "5.0.1",
34
34
  "buffer": "6.0.3",
35
- "@dynamic-labs/rpc-providers": "1.1.0-alpha.1",
36
- "@dynamic-labs/turnkey": "1.1.0-alpha.1",
37
- "@dynamic-labs/types": "1.1.0-alpha.1",
38
- "@dynamic-labs/utils": "1.1.0-alpha.1",
39
- "@dynamic-labs/wallet-book": "1.1.0-alpha.1",
40
- "@dynamic-labs/wallet-connector-core": "1.1.0-alpha.1",
35
+ "@dynamic-labs/rpc-providers": "1.1.0-alpha.11",
36
+ "@dynamic-labs/turnkey": "1.1.0-alpha.11",
37
+ "@dynamic-labs/types": "1.1.0-alpha.11",
38
+ "@dynamic-labs/utils": "1.1.0-alpha.11",
39
+ "@dynamic-labs/wallet-book": "1.1.0-alpha.11",
40
+ "@dynamic-labs/wallet-connector-core": "1.1.0-alpha.11",
41
41
  "stream": "0.0.2"
42
42
  },
43
43
  "peerDependencies": {
@@ -66,6 +66,13 @@ class EthWalletConnector extends walletConnectorCore.WalletConnectorBase {
66
66
  }
67
67
  return utils.retryableFn(provider.getChainId, {
68
68
  fallbackValue: utils.FALLBACK_UNDEFINED,
69
+ /**
70
+ * The timeout is set to 1 second because the getChainId method
71
+ * takes around 500ms to resolve on Brave. If the timeout is not set
72
+ * it will use 100ms by default and the method will fail.
73
+ * QNTM-815
74
+ */
75
+ timeoutMs: 1000,
69
76
  });
70
77
  });
71
78
  }
@@ -62,6 +62,13 @@ class EthWalletConnector extends WalletConnectorBase {
62
62
  }
63
63
  return retryableFn(provider.getChainId, {
64
64
  fallbackValue: FALLBACK_UNDEFINED,
65
+ /**
66
+ * The timeout is set to 1 second because the getChainId method
67
+ * takes around 500ms to resolve on Brave. If the timeout is not set
68
+ * it will use 100ms by default and the method will fail.
69
+ * QNTM-815
70
+ */
71
+ timeoutMs: 1000,
65
72
  });
66
73
  });
67
74
  }
@@ -11,19 +11,13 @@ var constants = require('../../constants.cjs');
11
11
  const jsonRpcUrl = `https://mainnet.infura.io/v3/${constants.INFURA_ID}`;
12
12
  const chainId = 1;
13
13
  let coinbaseProvider;
14
- const getCoinbaseProvider = ({ opts: { appLogoUrl, appName = '', evmNetworks = [] } = {}, handlers, }) => {
14
+ const getCoinbaseProvider = ({ opts: { appLogoUrl, appName = '', evmNetworks = [] } = {}, }) => {
15
15
  var _a, _b;
16
16
  if (!coinbaseProvider) {
17
17
  const coinbaseWalletSDK = new walletSdk.CoinbaseWalletSDK({
18
18
  appLogoUrl,
19
19
  appName,
20
- eventListener: {
21
- onEvent: (eventType) => {
22
- if (eventType === 'walletlink_sdk.disconnected') {
23
- handlers === null || handlers === void 0 ? void 0 : handlers.onDisconnect();
24
- }
25
- },
26
- },
20
+ enableMobileWalletLink: true,
27
21
  headlessMode: true,
28
22
  reloadOnDisconnect: false,
29
23
  });
@@ -7,19 +7,13 @@ import { INFURA_ID } from '../../constants.js';
7
7
  const jsonRpcUrl = `https://mainnet.infura.io/v3/${INFURA_ID}`;
8
8
  const chainId = 1;
9
9
  let coinbaseProvider;
10
- const getCoinbaseProvider = ({ opts: { appLogoUrl, appName = '', evmNetworks = [] } = {}, handlers, }) => {
10
+ const getCoinbaseProvider = ({ opts: { appLogoUrl, appName = '', evmNetworks = [] } = {}, }) => {
11
11
  var _a, _b;
12
12
  if (!coinbaseProvider) {
13
13
  const coinbaseWalletSDK = new CoinbaseWalletSDK({
14
14
  appLogoUrl,
15
15
  appName,
16
- eventListener: {
17
- onEvent: (eventType) => {
18
- if (eventType === 'walletlink_sdk.disconnected') {
19
- handlers === null || handlers === void 0 ? void 0 : handlers.onDisconnect();
20
- }
21
- },
22
- },
16
+ enableMobileWalletLink: true,
23
17
  headlessMode: true,
24
18
  reloadOnDisconnect: false,
25
19
  });
@@ -5,11 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _tslib = require('../../_virtual/_tslib.cjs');
6
6
  var viem = require('viem');
7
7
  var walletBook = require('@dynamic-labs/wallet-book');
8
- var EthWalletConnector = require('../EthWalletConnector.cjs');
9
8
  require('../polyfills.cjs');
10
9
  require('@dynamic-labs/turnkey');
11
10
  require('@dynamic-labs/utils');
12
11
  var ethProviderHelper = require('../ethProviderHelper.cjs');
12
+ var EthWalletConnector = require('../EthWalletConnector.cjs');
13
13
  require('../walletConnect/walletConnectV2.cjs');
14
14
  require('@walletconnect/ethereum-provider');
15
15
  require('@dynamic-labs/wallet-connector-core');
@@ -1,6 +1,6 @@
1
1
  import { Chain, FetchPublicAddressOpts } from '@dynamic-labs/wallet-connector-core';
2
- import { EthWalletConnector, EthWalletConnectorOpts } from '../EthWalletConnector';
3
2
  import { EthProviderHelper } from '..';
3
+ import { EthWalletConnector, EthWalletConnectorOpts } from '../EthWalletConnector';
4
4
  type CoinbaseOpts = EthWalletConnectorOpts & {
5
5
  appLogoUrl?: string;
6
6
  appName?: string;
@@ -1,11 +1,11 @@
1
1
  import { __rest, __awaiter } from '../../_virtual/_tslib.js';
2
2
  import { createPublicClient, custom, createWalletClient } from 'viem';
3
3
  import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
4
- import { EthWalletConnector } from '../EthWalletConnector.js';
5
4
  import '../polyfills.js';
6
5
  import '@dynamic-labs/turnkey';
7
6
  import '@dynamic-labs/utils';
8
7
  import { EthProviderHelper } from '../ethProviderHelper.js';
8
+ import { EthWalletConnector } from '../EthWalletConnector.js';
9
9
  import '../walletConnect/walletConnectV2.js';
10
10
  import '@walletconnect/ethereum-provider';
11
11
  import '@dynamic-labs/wallet-connector-core';
@@ -16,10 +16,7 @@ class EthProviderHelper {
16
16
  getInstalledProvider() {
17
17
  const eip6963Config = this.getEip6963Config();
18
18
  if (eip6963Config) {
19
- const eip6963Provider = this.eip6963ProviderLookup(eip6963Config.rdns);
20
- if (eip6963Provider) {
21
- return eip6963Provider;
22
- }
19
+ return this.eip6963ProviderLookup(eip6963Config.rdns);
23
20
  }
24
21
  const config = this.getInjectedConfig();
25
22
  if (!config ||
@@ -15,6 +15,11 @@ export declare class EthProviderHelper {
15
15
  value: boolean;
16
16
  flag: string;
17
17
  }[];
18
+ providerInterface?: string | undefined;
19
+ walletStandard?: {
20
+ features: string[];
21
+ name: string;
22
+ } | undefined;
18
23
  windowLocations?: string[] | undefined;
19
24
  } | undefined;
20
25
  installedProviders(): IEthereum[];
@@ -12,10 +12,7 @@ class EthProviderHelper {
12
12
  getInstalledProvider() {
13
13
  const eip6963Config = this.getEip6963Config();
14
14
  if (eip6963Config) {
15
- const eip6963Provider = this.eip6963ProviderLookup(eip6963Config.rdns);
16
- if (eip6963Provider) {
17
- return eip6963Provider;
18
- }
15
+ return this.eip6963ProviderLookup(eip6963Config.rdns);
19
16
  }
20
17
  const config = this.getInjectedConfig();
21
18
  if (!config ||
@@ -21,16 +21,11 @@ class PhantomEvm extends InjectedWalletBase {
21
21
  if (this.isInstalledOnBrowser()) {
22
22
  return _super.fetchPublicAddress.call(this);
23
23
  }
24
- const url = encodeURIComponent(window.location.toString());
25
- const ref = encodeURIComponent(window.location.origin);
26
- // samsung browser only supports native links, not universal links
27
24
  if (utils.isMobile()) {
28
- if (utils.isSamsungBrowser()) {
29
- window.location.assign(`phantom://browse/${url}?ref=${ref}`);
30
- }
31
- else {
32
- window.location.assign(`https://phantom.app/ul/browse/${url}?ref=${ref}`);
33
- }
25
+ utils.handleMobileWalletRedirect({
26
+ nativeLink: 'phantom://browse',
27
+ universalLink: 'https://phantom.app/ul/browse',
28
+ });
34
29
  }
35
30
  return undefined;
36
31
  });
@@ -1,5 +1,5 @@
1
1
  import { __awaiter } from '../../_virtual/_tslib.js';
2
- import { isMobile, isSamsungBrowser } from '@dynamic-labs/utils';
2
+ import { isMobile, handleMobileWalletRedirect } from '@dynamic-labs/utils';
3
3
  import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
4
4
  import InjectedWalletBase from './InjectedWalletBase.js';
5
5
 
@@ -17,16 +17,11 @@ class PhantomEvm extends InjectedWalletBase {
17
17
  if (this.isInstalledOnBrowser()) {
18
18
  return _super.fetchPublicAddress.call(this);
19
19
  }
20
- const url = encodeURIComponent(window.location.toString());
21
- const ref = encodeURIComponent(window.location.origin);
22
- // samsung browser only supports native links, not universal links
23
20
  if (isMobile()) {
24
- if (isSamsungBrowser()) {
25
- window.location.assign(`phantom://browse/${url}?ref=${ref}`);
26
- }
27
- else {
28
- window.location.assign(`https://phantom.app/ul/browse/${url}?ref=${ref}`);
29
- }
21
+ handleMobileWalletRedirect({
22
+ nativeLink: 'phantom://browse',
23
+ universalLink: 'https://phantom.app/ul/browse',
24
+ });
30
25
  }
31
26
  return undefined;
32
27
  });
@@ -12,8 +12,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
12
12
 
13
13
  var Client__default = /*#__PURE__*/_interopDefaultLegacy(Client);
14
14
 
15
- const initClient = (name, bridge, settings) => {
16
- const storageId = `walletconnect-${name}`;
15
+ const initClient = (key, bridge, settings) => {
16
+ const storageId = `walletconnect-${key}`;
17
17
  const session = localStorage.getItem(storageId);
18
18
  const clientArgs = session
19
19
  ? { session: JSON.parse(session), storageId }
@@ -2,7 +2,7 @@ import Client from '@walletconnect/client';
2
2
  import { PublicClient } from 'viem';
3
3
  import { FetchPublicAddressOpts, PayloadParams, DeepLinkVariant, WalletConnector } from '@dynamic-labs/wallet-connector-core';
4
4
  import { WalletSchema } from '@dynamic-labs/wallet-book';
5
- export declare const initClient: (name: string, bridge: string, settings?: any) => Client;
5
+ export declare const initClient: (key: string, bridge: string, settings?: any) => Client;
6
6
  /**
7
7
  * Attach event handlers to WalletConnect events.
8
8
  */
@@ -4,8 +4,8 @@ import { hashMessage } from 'viem';
4
4
  import { isSameAddress, logger, performPlatformSpecificConnectionMethod, getDeepLink } from '@dynamic-labs/wallet-connector-core';
5
5
  import { isMobile } from '@dynamic-labs/utils';
6
6
 
7
- const initClient = (name, bridge, settings) => {
8
- const storageId = `walletconnect-${name}`;
7
+ const initClient = (key, bridge, settings) => {
8
+ const storageId = `walletconnect-${key}`;
9
9
  const session = localStorage.getItem(storageId);
10
10
  const clientArgs = session
11
11
  ? { session: JSON.parse(session), storageId }
@@ -36,7 +36,7 @@ class WalletConnect extends EthWalletConnector.EthWalletConnector {
36
36
  if (this.client) {
37
37
  return this.client;
38
38
  }
39
- this.client = client.initClient(walletConnectorCore.normalizeWalletName(this.name), this.bridge, this.clientOptions);
39
+ this.client = client.initClient(this.key, this.bridge, this.clientOptions);
40
40
  return this.client;
41
41
  }
42
42
  supportsNetworkSwitching() {
@@ -1,7 +1,7 @@
1
1
  import { __rest, __awaiter } from '../../_virtual/_tslib.js';
2
2
  import WalletConnectProvider from '@walletconnect/ethereum-provider';
3
3
  import { createWalletClient, custom } from 'viem';
4
- import { normalizeWalletName, getDeepLink } from '@dynamic-labs/wallet-connector-core';
4
+ import { getDeepLink } from '@dynamic-labs/wallet-connector-core';
5
5
  import { getWalletBookWallet } from '@dynamic-labs/wallet-book';
6
6
  import { isMobile, DynamicError } from '@dynamic-labs/utils';
7
7
  import { EthWalletConnector } from '../EthWalletConnector.js';
@@ -28,7 +28,7 @@ class WalletConnect extends EthWalletConnector {
28
28
  if (this.client) {
29
29
  return this.client;
30
30
  }
31
- this.client = initClient(normalizeWalletName(this.name), this.bridge, this.clientOptions);
31
+ this.client = initClient(this.key, this.bridge, this.clientOptions);
32
32
  return this.client;
33
33
  }
34
34
  supportsNetworkSwitching() {