@dynamic-labs/embedded-wallet-evm 5.0.0-rc.0 → 5.0.0-rc.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 +72 -1
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +10 -10
- package/src/{TurnkeyEVMWalletConnectors.cjs → LegacyEVMEmbeddedWalletConnectors.cjs} +5 -10
- package/src/LegacyEVMEmbeddedWalletConnectors.d.ts +2 -0
- package/src/{TurnkeyEVMWalletConnectors.js → LegacyEVMEmbeddedWalletConnectors.js} +5 -9
- package/src/index.cjs +4 -5
- package/src/index.d.ts +2 -2
- package/src/index.js +2 -2
- package/src/lib/{TurnkeyEVMWalletConnector/TurnkeyEVMWalletConnector.cjs → LegacyEVMEmbeddedWalletConnector/LegacyEVMEmbeddedWalletConnector.cjs} +8 -8
- package/src/lib/{TurnkeyEVMWalletConnector/TurnkeyEVMWalletConnector.d.ts → LegacyEVMEmbeddedWalletConnector/LegacyEVMEmbeddedWalletConnector.d.ts} +1 -1
- package/src/lib/{TurnkeyEVMWalletConnector/TurnkeyEVMWalletConnector.js → LegacyEVMEmbeddedWalletConnector/LegacyEVMEmbeddedWalletConnector.js} +8 -8
- package/src/lib/LegacyEVMEmbeddedWalletConnector/index.d.ts +1 -0
- package/src/TurnkeyEVMWalletConnectors.d.ts +0 -6
- package/src/lib/TurnkeyEVMWalletConnector/index.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,76 @@
|
|
|
1
1
|
|
|
2
|
-
## [5.0.0-rc.
|
|
2
|
+
## [5.0.0-rc.1](https://github.com/dynamic-labs/dynamic-auth/compare/v5.0.0-rc.0...v5.0.0-rc.1) (2026-07-17)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ⚠ BREAKING CHANGES
|
|
6
|
+
|
|
7
|
+
* move legacy embedded wallet to waas upgrade flow to new legacy-embedded-wallet-migration package (#11841)
|
|
8
|
+
* drop default injection of legacy embedded wallet connectors (#11833)
|
|
9
|
+
* remove legacy embedded wallet support (#11979)
|
|
10
|
+
* throw when legacy embedded wallet is detected without migration provider (#11855)
|
|
11
|
+
* remove deprecated eclipse package (#11831)
|
|
12
|
+
* remove deprecated functions and props (#11832)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### [4.92.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.92.3...v4.92.4) (2026-07-16)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **bitcoin:** per-network address switching and dust-limit send validation [v4] ([#11970](https://github.com/dynamic-labs/dynamic-auth/issues/11970)) ([76a4a9a](https://github.com/dynamic-labs/dynamic-auth/commit/76a4a9a5025d78798ebd1beffe6c0af59d2d029a)), closes [#11896](https://github.com/dynamic-labs/dynamic-auth/issues/11896) [#11800](https://github.com/dynamic-labs/dynamic-auth/issues/11800)
|
|
21
|
+
* **midnight:** per-network addresses in deposit and wallet info views [v4] ([#11949](https://github.com/dynamic-labs/dynamic-auth/issues/11949)) ([978446a](https://github.com/dynamic-labs/dynamic-auth/commit/978446aca8546eb038ba9ed3be0503d10594ee15))
|
|
22
|
+
* **midnight:** resolve wallet address per selected network [v4] ([#11948](https://github.com/dynamic-labs/dynamic-auth/issues/11948)) ([d6f858c](https://github.com/dynamic-labs/dynamic-auth/commit/d6f858c5e35defda7ed73cf97b3fdbe5ed9d131d))
|
|
23
|
+
* set useMetamaskSdk to true by default ([#11926](https://github.com/dynamic-labs/dynamic-auth/issues/11926)) ([75b5a4a](https://github.com/dynamic-labs/dynamic-auth/commit/75b5a4a0fe8b1a375afce145c0b8bdc3ce761117))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* **midnight:** align per-network code with the final main iteration [v4] ([#11971](https://github.com/dynamic-labs/dynamic-auth/issues/11971)) ([3ef3ba8](https://github.com/dynamic-labs/dynamic-auth/commit/3ef3ba8c090dfd9e4286b4e51bf350ea5e6feac7))
|
|
29
|
+
* settle social sign-in when captcha is backed out or oauth popup never responds (v4) ([#11956](https://github.com/dynamic-labs/dynamic-auth/issues/11956)) ([ad49477](https://github.com/dynamic-labs/dynamic-auth/commit/ad49477f2acf61a154bb79cbe26b24f803cdb0e2))
|
|
30
|
+
* validate that private key is not empty before upgrading to WaaS ([#11952](https://github.com/dynamic-labs/dynamic-auth/issues/11952)) ([21dfb83](https://github.com/dynamic-labs/dynamic-auth/commit/21dfb83cb29e42b335bc94a0cdd2062cf14a262a))
|
|
31
|
+
|
|
32
|
+
### [4.92.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.92.2...v4.92.3) (2026-07-10)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* **sdk-react-core:** fix deterministic 'Wallet not found' crash in embedded wallet export (v4) ([#11906](https://github.com/dynamic-labs/dynamic-auth/issues/11906)) ([913ef23](https://github.com/dynamic-labs/dynamic-auth/commit/913ef236b26245488e1cd5db7e874601b65ff0a2)), closes [#11905](https://github.com/dynamic-labs/dynamic-auth/issues/11905) [#11729](https://github.com/dynamic-labs/dynamic-auth/issues/11729)
|
|
38
|
+
|
|
39
|
+
### [4.92.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.92.1...v4.92.2) (2026-07-09)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
* engage captcha during step-up OTP re-auth ([#11879](https://github.com/dynamic-labs/dynamic-auth/issues/11879)) ([585460a](https://github.com/dynamic-labs/dynamic-auth/commit/585460a8976803a8ed0aad16a4a00047bd6c115a))
|
|
45
|
+
* **waas:** gate v1 wallet upgrade on recovery for email-only wallets ([#11897](https://github.com/dynamic-labs/dynamic-auth/issues/11897)) ([5a6f0c6](https://github.com/dynamic-labs/dynamic-auth/commit/5a6f0c6bf3120e59cf502004d09fae56f193e977))
|
|
46
|
+
|
|
47
|
+
### [4.92.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.92.0...v4.92.1) (2026-07-09)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Bug Fixes
|
|
51
|
+
|
|
52
|
+
* **ethereum:** fire in-app-browser redirect on sign for injected EVM wallets that use in-app-browser experience ([#11888](https://github.com/dynamic-labs/dynamic-auth/issues/11888)) ([5116d91](https://github.com/dynamic-labs/dynamic-auth/commit/5116d91ab2c71000a490d72c5d278549d4d8ae9a))
|
|
53
|
+
* **sdk-react-core:** show clear message for Phantom redirect signing failures (v4 backport) ([#11886](https://github.com/dynamic-labs/dynamic-auth/issues/11886)) ([60ac897](https://github.com/dynamic-labs/dynamic-auth/commit/60ac897ba81f7758ccd7a05f97b619785e1f50a7))
|
|
54
|
+
* **social:** use redirect strategy for step-up OAuth on mobile [V4 backport] ([#11881](https://github.com/dynamic-labs/dynamic-auth/issues/11881)) ([42a202e](https://github.com/dynamic-labs/dynamic-auth/commit/42a202e6255de8db73df02eff37c0b10b24fef1a))
|
|
55
|
+
* **solana:** fire in-app-browser redirect on sign and wallet switch ([#11871](https://github.com/dynamic-labs/dynamic-auth/issues/11871)) ([4e2d6b7](https://github.com/dynamic-labs/dynamic-auth/commit/4e2d6b7ac8fdef5bf7c62b8a726ecaef1c6210ec))
|
|
56
|
+
* **solana:** resolve Phantom/Backpack provider collision and Backpack >=0.10.x connect hangs ([#11856](https://github.com/dynamic-labs/dynamic-auth/issues/11856)) ([#11882](https://github.com/dynamic-labs/dynamic-auth/issues/11882)) ([5784aff](https://github.com/dynamic-labs/dynamic-auth/commit/5784aff9641bbc85445fb466f3ab1d6a14331e73))
|
|
57
|
+
|
|
58
|
+
## [4.92.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.6...v4.92.0) (2026-07-08)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### Features
|
|
62
|
+
|
|
63
|
+
* **captcha:** add Cloudflare Turnstile provider support alongside hCaptcha (v4) ([#11798](https://github.com/dynamic-labs/dynamic-auth/issues/11798)) ([114c770](https://github.com/dynamic-labs/dynamic-auth/commit/114c7702e900d8dedeebe7be867de35d11a93f31))
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Bug Fixes
|
|
67
|
+
|
|
68
|
+
* **ethereum-aa:** resolve kernel client config per wallet (v4) ([#11870](https://github.com/dynamic-labs/dynamic-auth/issues/11870)) ([1b66d79](https://github.com/dynamic-labs/dynamic-auth/commit/1b66d79b4a32b4b6de433b7536bc46e6719224c6))
|
|
69
|
+
* **iframe-setup:** block dangerous URL schemes and verify sender in OPEN_URL ([#11819](https://github.com/dynamic-labs/dynamic-auth/issues/11819)) ([329b27e](https://github.com/dynamic-labs/dynamic-auth/commit/329b27e9fac825916ab227ec8cf93dc343898923))
|
|
70
|
+
* improve social OAuth error messages ([#11837](https://github.com/dynamic-labs/dynamic-auth/issues/11837)) ([8e57c06](https://github.com/dynamic-labs/dynamic-auth/commit/8e57c067c5a89111a32a12fb82e190cf6c46ad67))
|
|
71
|
+
* **react-native-extension:** reject path traversal in downloadFile fileName ([#11816](https://github.com/dynamic-labs/dynamic-auth/issues/11816)) ([9367a56](https://github.com/dynamic-labs/dynamic-auth/commit/9367a56b6daa853d7f7e7f5534261bc68825b239))
|
|
72
|
+
* **sdk-react-core:** display exactly the bytes signed in personal_sign preview ([#11818](https://github.com/dynamic-labs/dynamic-auth/issues/11818)) ([30b9382](https://github.com/dynamic-labs/dynamic-auth/commit/30b93829122f00060cb484aef09a03294c03f651))
|
|
73
|
+
|
|
3
74
|
|
|
4
75
|
### [4.91.6](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.5...v4.91.6) (2026-07-03)
|
|
5
76
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/embedded-wallet-evm",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.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",
|
|
@@ -18,19 +18,19 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
21
|
+
"@dynamic-labs/sdk-api-core": "0.0.1082",
|
|
22
22
|
"@turnkey/api-key-stamper": "0.4.7",
|
|
23
23
|
"@turnkey/iframe-stamper": "2.5.0",
|
|
24
24
|
"@turnkey/viem": "0.13.0",
|
|
25
25
|
"@turnkey/webauthn-stamper": "0.5.1",
|
|
26
|
-
"@dynamic-labs/assert-package-version": "5.0.0-rc.
|
|
27
|
-
"@dynamic-labs/embedded-wallet": "5.0.0-rc.
|
|
28
|
-
"@dynamic-labs/ethereum-core": "5.0.0-rc.
|
|
29
|
-
"@dynamic-labs/types": "5.0.0-rc.
|
|
30
|
-
"@dynamic-labs/utils": "5.0.0-rc.
|
|
31
|
-
"@dynamic-labs/wallet-book": "5.0.0-rc.
|
|
32
|
-
"@dynamic-labs/wallet-connector-core": "5.0.0-rc.
|
|
33
|
-
"@dynamic-labs/webauthn": "5.0.0-rc.
|
|
26
|
+
"@dynamic-labs/assert-package-version": "5.0.0-rc.1",
|
|
27
|
+
"@dynamic-labs/embedded-wallet": "5.0.0-rc.1",
|
|
28
|
+
"@dynamic-labs/ethereum-core": "5.0.0-rc.1",
|
|
29
|
+
"@dynamic-labs/types": "5.0.0-rc.1",
|
|
30
|
+
"@dynamic-labs/utils": "5.0.0-rc.1",
|
|
31
|
+
"@dynamic-labs/wallet-book": "5.0.0-rc.1",
|
|
32
|
+
"@dynamic-labs/wallet-connector-core": "5.0.0-rc.1",
|
|
33
|
+
"@dynamic-labs/webauthn": "5.0.0-rc.1"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"viem": "^2.45.3"
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var embeddedWallet = require('@dynamic-labs/embedded-wallet');
|
|
7
|
-
var
|
|
7
|
+
var LegacyEVMEmbeddedWalletConnector = require('./lib/LegacyEVMEmbeddedWalletConnector/LegacyEVMEmbeddedWalletConnector.cjs');
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const LegacyEVMEmbeddedWalletConnectors = (props) => {
|
|
10
10
|
var _a;
|
|
11
11
|
if ((_a = props.apiProviders) === null || _a === void 0 ? void 0 : _a.turnkey) {
|
|
12
12
|
return [
|
|
13
|
-
class extends
|
|
13
|
+
class extends LegacyEVMEmbeddedWalletConnector.LegacyEVMEmbeddedWalletConnector {
|
|
14
14
|
constructor(innerProps) {
|
|
15
15
|
super(embeddedWallet.TurnkeyWalletConnectorInfo.TurnkeyHD, Object.assign(Object.assign({}, props), innerProps));
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
-
class extends
|
|
18
|
+
class extends LegacyEVMEmbeddedWalletConnector.LegacyEVMEmbeddedWalletConnector {
|
|
19
19
|
constructor(innerProps) {
|
|
20
20
|
super(embeddedWallet.TurnkeyWalletConnectorInfo.Turnkey, Object.assign(Object.assign({}, props), innerProps));
|
|
21
21
|
}
|
|
@@ -24,10 +24,5 @@ const TurnkeyEVMWalletConnectors = (props) => {
|
|
|
24
24
|
}
|
|
25
25
|
return [];
|
|
26
26
|
};
|
|
27
|
-
/**
|
|
28
|
-
* @deprecated Use `TurnkeyEVMWalletConnectors` instead
|
|
29
|
-
*/
|
|
30
|
-
const TurnkeyWalletConnectors = TurnkeyEVMWalletConnectors;
|
|
31
27
|
|
|
32
|
-
exports.
|
|
33
|
-
exports.TurnkeyWalletConnectors = TurnkeyWalletConnectors;
|
|
28
|
+
exports.LegacyEVMEmbeddedWalletConnectors = LegacyEVMEmbeddedWalletConnectors;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { TurnkeyWalletConnectorInfo } from '@dynamic-labs/embedded-wallet';
|
|
3
|
-
import {
|
|
3
|
+
import { LegacyEVMEmbeddedWalletConnector } from './lib/LegacyEVMEmbeddedWalletConnector/LegacyEVMEmbeddedWalletConnector.js';
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const LegacyEVMEmbeddedWalletConnectors = (props) => {
|
|
6
6
|
var _a;
|
|
7
7
|
if ((_a = props.apiProviders) === null || _a === void 0 ? void 0 : _a.turnkey) {
|
|
8
8
|
return [
|
|
9
|
-
class extends
|
|
9
|
+
class extends LegacyEVMEmbeddedWalletConnector {
|
|
10
10
|
constructor(innerProps) {
|
|
11
11
|
super(TurnkeyWalletConnectorInfo.TurnkeyHD, Object.assign(Object.assign({}, props), innerProps));
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
|
-
class extends
|
|
14
|
+
class extends LegacyEVMEmbeddedWalletConnector {
|
|
15
15
|
constructor(innerProps) {
|
|
16
16
|
super(TurnkeyWalletConnectorInfo.Turnkey, Object.assign(Object.assign({}, props), innerProps));
|
|
17
17
|
}
|
|
@@ -20,9 +20,5 @@ const TurnkeyEVMWalletConnectors = (props) => {
|
|
|
20
20
|
}
|
|
21
21
|
return [];
|
|
22
22
|
};
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated Use `TurnkeyEVMWalletConnectors` instead
|
|
25
|
-
*/
|
|
26
|
-
const TurnkeyWalletConnectors = TurnkeyEVMWalletConnectors;
|
|
27
23
|
|
|
28
|
-
export {
|
|
24
|
+
export { LegacyEVMEmbeddedWalletConnectors };
|
package/src/index.cjs
CHANGED
|
@@ -5,11 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var assertPackageVersion = require('@dynamic-labs/assert-package-version');
|
|
7
7
|
var _package = require('../package.cjs');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
8
|
+
var LegacyEVMEmbeddedWalletConnectors = require('./LegacyEVMEmbeddedWalletConnectors.cjs');
|
|
9
|
+
var LegacyEVMEmbeddedWalletConnector = require('./lib/LegacyEVMEmbeddedWalletConnector/LegacyEVMEmbeddedWalletConnector.cjs');
|
|
10
10
|
|
|
11
11
|
assertPackageVersion.assertPackageVersion('@dynamic-labs/embedded-wallet-evm', _package.version);
|
|
12
12
|
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.TurnkeyEVMWalletConnector = TurnkeyEVMWalletConnector.TurnkeyEVMWalletConnector;
|
|
13
|
+
exports.LegacyEVMEmbeddedWalletConnectors = LegacyEVMEmbeddedWalletConnectors.LegacyEVMEmbeddedWalletConnectors;
|
|
14
|
+
exports.LegacyEVMEmbeddedWalletConnector = LegacyEVMEmbeddedWalletConnector.LegacyEVMEmbeddedWalletConnector;
|
package/src/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export {
|
|
1
|
+
export * from './LegacyEVMEmbeddedWalletConnectors';
|
|
2
|
+
export { LegacyEVMEmbeddedWalletConnector } from './lib/LegacyEVMEmbeddedWalletConnector';
|
package/src/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { assertPackageVersion } from '@dynamic-labs/assert-package-version';
|
|
3
3
|
import { version } from '../package.js';
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
4
|
+
export { LegacyEVMEmbeddedWalletConnectors } from './LegacyEVMEmbeddedWalletConnectors.js';
|
|
5
|
+
export { LegacyEVMEmbeddedWalletConnector } from './lib/LegacyEVMEmbeddedWalletConnector/LegacyEVMEmbeddedWalletConnector.js';
|
|
6
6
|
|
|
7
7
|
assertPackageVersion('@dynamic-labs/embedded-wallet-evm', version);
|
|
@@ -16,7 +16,7 @@ var ethereumCore = require('@dynamic-labs/ethereum-core');
|
|
|
16
16
|
var utils = require('@dynamic-labs/utils');
|
|
17
17
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
18
18
|
|
|
19
|
-
class
|
|
19
|
+
class LegacyEVMEmbeddedWalletConnector extends embeddedWallet.TurnkeyWalletConnectorBase {
|
|
20
20
|
constructor(nameAndKey, props) {
|
|
21
21
|
var _a, _b, _c;
|
|
22
22
|
super(nameAndKey, props);
|
|
@@ -47,7 +47,7 @@ class TurnkeyEVMWalletConnector extends embeddedWallet.TurnkeyWalletConnectorBas
|
|
|
47
47
|
}
|
|
48
48
|
getLastUsedChainId() {
|
|
49
49
|
var _a;
|
|
50
|
-
embeddedWallet.logger.logVerboseTroubleshootingMessage('[
|
|
50
|
+
embeddedWallet.logger.logVerboseTroubleshootingMessage('[LegacyEVMEmbeddedWalletConnector] getLastUsedChainId', {
|
|
51
51
|
evmNetworks: this.evmNetworks,
|
|
52
52
|
lastUsedChainId: this.lastUsedChainId,
|
|
53
53
|
});
|
|
@@ -241,7 +241,7 @@ class TurnkeyEVMWalletConnector extends embeddedWallet.TurnkeyWalletConnectorBas
|
|
|
241
241
|
return (_a = this._selectedChainId) !== null && _a !== void 0 ? _a : (_c = (_b = this.evmNetworks) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.chainId;
|
|
242
242
|
}
|
|
243
243
|
get lastUsedChainId() {
|
|
244
|
-
const lastUsedChainIdLS = localStorage.getItem(
|
|
244
|
+
const lastUsedChainIdLS = localStorage.getItem(LegacyEVMEmbeddedWalletConnector.lastUsedChainIdStorageKey);
|
|
245
245
|
if (!lastUsedChainIdLS)
|
|
246
246
|
return undefined;
|
|
247
247
|
try {
|
|
@@ -264,10 +264,10 @@ class TurnkeyEVMWalletConnector extends embeddedWallet.TurnkeyWalletConnectorBas
|
|
|
264
264
|
}
|
|
265
265
|
set lastUsedChainId(chainId) {
|
|
266
266
|
if (chainId === undefined) {
|
|
267
|
-
localStorage.removeItem(
|
|
267
|
+
localStorage.removeItem(LegacyEVMEmbeddedWalletConnector.lastUsedChainIdStorageKey);
|
|
268
268
|
}
|
|
269
269
|
else {
|
|
270
|
-
localStorage.setItem(
|
|
270
|
+
localStorage.setItem(LegacyEVMEmbeddedWalletConnector.lastUsedChainIdStorageKey, chainId.toString());
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
get networkRpcUrl() {
|
|
@@ -284,7 +284,7 @@ class TurnkeyEVMWalletConnector extends embeddedWallet.TurnkeyWalletConnectorBas
|
|
|
284
284
|
}
|
|
285
285
|
get currentEvmNetwork() {
|
|
286
286
|
const chainId = this.currentChainId;
|
|
287
|
-
embeddedWallet.logger.logVerboseTroubleshootingMessage('[
|
|
287
|
+
embeddedWallet.logger.logVerboseTroubleshootingMessage('[LegacyEVMEmbeddedWalletConnector] currentEvmNetwork', {
|
|
288
288
|
chainId,
|
|
289
289
|
evmNetworks: this.evmNetworks,
|
|
290
290
|
});
|
|
@@ -473,6 +473,6 @@ class TurnkeyEVMWalletConnector extends embeddedWallet.TurnkeyWalletConnectorBas
|
|
|
473
473
|
return true;
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
|
|
476
|
+
LegacyEVMEmbeddedWalletConnector.lastUsedChainIdStorageKey = 'turnkey-last-used-chain-id';
|
|
477
477
|
|
|
478
|
-
exports.
|
|
478
|
+
exports.LegacyEVMEmbeddedWalletConnector = LegacyEVMEmbeddedWalletConnector;
|
|
@@ -15,7 +15,7 @@ export type TurnkeyEVMConnectorProps = {
|
|
|
15
15
|
providersConfig?: RegisterEvmProvidersConfig;
|
|
16
16
|
};
|
|
17
17
|
type SignAuthorizationParametersWithoutPrivateKey = Omit<SignAuthorizationParameters, 'privateKey'>;
|
|
18
|
-
export declare class
|
|
18
|
+
export declare class LegacyEVMEmbeddedWalletConnector extends TurnkeyWalletConnectorBase implements ISendBalanceWalletConnector {
|
|
19
19
|
walletFallback: {
|
|
20
20
|
brand: {
|
|
21
21
|
alt: string;
|
|
@@ -12,7 +12,7 @@ import { EthereumWallet, createWalletClientWithUiConfirmation, getOrMapViemChain
|
|
|
12
12
|
import { parseEvmNetworks, DynamicError, assertDefined } from '@dynamic-labs/utils';
|
|
13
13
|
import { getRpcUrlForChain, isSameAddress } from '@dynamic-labs/wallet-connector-core';
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class LegacyEVMEmbeddedWalletConnector extends TurnkeyWalletConnectorBase {
|
|
16
16
|
constructor(nameAndKey, props) {
|
|
17
17
|
var _a, _b, _c;
|
|
18
18
|
super(nameAndKey, props);
|
|
@@ -43,7 +43,7 @@ class TurnkeyEVMWalletConnector extends TurnkeyWalletConnectorBase {
|
|
|
43
43
|
}
|
|
44
44
|
getLastUsedChainId() {
|
|
45
45
|
var _a;
|
|
46
|
-
logger.logVerboseTroubleshootingMessage('[
|
|
46
|
+
logger.logVerboseTroubleshootingMessage('[LegacyEVMEmbeddedWalletConnector] getLastUsedChainId', {
|
|
47
47
|
evmNetworks: this.evmNetworks,
|
|
48
48
|
lastUsedChainId: this.lastUsedChainId,
|
|
49
49
|
});
|
|
@@ -237,7 +237,7 @@ class TurnkeyEVMWalletConnector extends TurnkeyWalletConnectorBase {
|
|
|
237
237
|
return (_a = this._selectedChainId) !== null && _a !== void 0 ? _a : (_c = (_b = this.evmNetworks) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.chainId;
|
|
238
238
|
}
|
|
239
239
|
get lastUsedChainId() {
|
|
240
|
-
const lastUsedChainIdLS = localStorage.getItem(
|
|
240
|
+
const lastUsedChainIdLS = localStorage.getItem(LegacyEVMEmbeddedWalletConnector.lastUsedChainIdStorageKey);
|
|
241
241
|
if (!lastUsedChainIdLS)
|
|
242
242
|
return undefined;
|
|
243
243
|
try {
|
|
@@ -260,10 +260,10 @@ class TurnkeyEVMWalletConnector extends TurnkeyWalletConnectorBase {
|
|
|
260
260
|
}
|
|
261
261
|
set lastUsedChainId(chainId) {
|
|
262
262
|
if (chainId === undefined) {
|
|
263
|
-
localStorage.removeItem(
|
|
263
|
+
localStorage.removeItem(LegacyEVMEmbeddedWalletConnector.lastUsedChainIdStorageKey);
|
|
264
264
|
}
|
|
265
265
|
else {
|
|
266
|
-
localStorage.setItem(
|
|
266
|
+
localStorage.setItem(LegacyEVMEmbeddedWalletConnector.lastUsedChainIdStorageKey, chainId.toString());
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
get networkRpcUrl() {
|
|
@@ -280,7 +280,7 @@ class TurnkeyEVMWalletConnector extends TurnkeyWalletConnectorBase {
|
|
|
280
280
|
}
|
|
281
281
|
get currentEvmNetwork() {
|
|
282
282
|
const chainId = this.currentChainId;
|
|
283
|
-
logger.logVerboseTroubleshootingMessage('[
|
|
283
|
+
logger.logVerboseTroubleshootingMessage('[LegacyEVMEmbeddedWalletConnector] currentEvmNetwork', {
|
|
284
284
|
chainId,
|
|
285
285
|
evmNetworks: this.evmNetworks,
|
|
286
286
|
});
|
|
@@ -469,6 +469,6 @@ class TurnkeyEVMWalletConnector extends TurnkeyWalletConnectorBase {
|
|
|
469
469
|
return true;
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
|
|
472
|
+
LegacyEVMEmbeddedWalletConnector.lastUsedChainIdStorageKey = 'turnkey-last-used-chain-id';
|
|
473
473
|
|
|
474
|
-
export {
|
|
474
|
+
export { LegacyEVMEmbeddedWalletConnector };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LegacyEVMEmbeddedWalletConnector';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { WalletConnectorConstructor } from '@dynamic-labs/wallet-connector-core';
|
|
2
|
-
export declare const TurnkeyEVMWalletConnectors: (props: any) => WalletConnectorConstructor[];
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Use `TurnkeyEVMWalletConnectors` instead
|
|
5
|
-
*/
|
|
6
|
-
export declare const TurnkeyWalletConnectors: (props: any) => WalletConnectorConstructor[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './TurnkeyEVMWalletConnector';
|