@dynamic-labs/sdk-react-core 4.25.1 → 4.25.2
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 +9 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -11
- package/src/lib/context/ConnectWithOtpContext/ConnectWithOtpProvider.cjs +6 -4
- package/src/lib/context/ConnectWithOtpContext/ConnectWithOtpProvider.js +6 -4
- package/src/lib/context/DynamicContext/hooks/useRemoveWallet/useRemoveWallet.cjs +12 -2
- package/src/lib/context/DynamicContext/hooks/useRemoveWallet/useRemoveWallet.d.ts +1 -1
- package/src/lib/context/DynamicContext/hooks/useRemoveWallet/useRemoveWallet.js +13 -3
- package/src/lib/context/DynamicContext/types/IDynamicContext.d.ts +1 -1
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.cjs +26 -6
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.js +26 -6
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +4 -3
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +4 -3
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +36 -36
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +36 -36
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.25.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.25.1...v4.25.2) (2025-07-18)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* ensure captcha is engaged only once ([#9197](https://github.com/dynamic-labs/dynamic-auth/issues/9197)) ([708edea](https://github.com/dynamic-labs/dynamic-auth/commit/708edea5d492f1dedb398886bf6201d458b40454))
|
|
8
|
+
* **GVTY-3193:** emit embedded wallet create event for waas ([#9179](https://github.com/dynamic-labs/dynamic-auth/issues/9179)) ([59c354d](https://github.com/dynamic-labs/dynamic-auth/commit/59c354d09524eed7d2f7727d1afbb567aabd1da2))
|
|
9
|
+
* reset user/wallet state when removing last wallet ([#9192](https://github.com/dynamic-labs/dynamic-auth/issues/9192)) ([78d84f9](https://github.com/dynamic-labs/dynamic-auth/commit/78d84f9bd6cafd75ec3f18a312600e2bf46db85f))
|
|
10
|
+
|
|
2
11
|
### [4.25.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.25.0...v4.25.1) (2025-07-18)
|
|
3
12
|
|
|
4
13
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "4.25.
|
|
3
|
+
"version": "4.25.2",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@dynamic-labs/sdk-api-core": "0.0.718",
|
|
6
6
|
"@dynamic-labs-sdk/client": "0.0.1-alpha.16",
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
"yup": "0.32.11",
|
|
16
16
|
"react-international-phone": "4.5.0",
|
|
17
17
|
"bs58": "5.0.0",
|
|
18
|
-
"@dynamic-labs/assert-package-version": "4.25.
|
|
19
|
-
"@dynamic-labs/iconic": "4.25.
|
|
20
|
-
"@dynamic-labs/logger": "4.25.
|
|
21
|
-
"@dynamic-labs/multi-wallet": "4.25.
|
|
22
|
-
"@dynamic-labs/rpc-providers": "4.25.
|
|
23
|
-
"@dynamic-labs/store": "4.25.
|
|
24
|
-
"@dynamic-labs/types": "4.25.
|
|
25
|
-
"@dynamic-labs/utils": "4.25.
|
|
26
|
-
"@dynamic-labs/wallet-book": "4.25.
|
|
27
|
-
"@dynamic-labs/wallet-connector-core": "4.25.
|
|
18
|
+
"@dynamic-labs/assert-package-version": "4.25.2",
|
|
19
|
+
"@dynamic-labs/iconic": "4.25.2",
|
|
20
|
+
"@dynamic-labs/logger": "4.25.2",
|
|
21
|
+
"@dynamic-labs/multi-wallet": "4.25.2",
|
|
22
|
+
"@dynamic-labs/rpc-providers": "4.25.2",
|
|
23
|
+
"@dynamic-labs/store": "4.25.2",
|
|
24
|
+
"@dynamic-labs/types": "4.25.2",
|
|
25
|
+
"@dynamic-labs/utils": "4.25.2",
|
|
26
|
+
"@dynamic-labs/wallet-book": "4.25.2",
|
|
27
|
+
"@dynamic-labs/wallet-connector-core": "4.25.2",
|
|
28
28
|
"eventemitter3": "5.0.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
@@ -139,7 +139,8 @@ const ConnectWithOtpProvider = ({ children }) => {
|
|
|
139
139
|
}),
|
|
140
140
|
});
|
|
141
141
|
});
|
|
142
|
-
const connectWithEmail = (
|
|
142
|
+
const connectWithEmail = (email_1, ...args_1) => _tslib.__awaiter(void 0, [email_1, ...args_1], void 0, function* (email, options = {}) {
|
|
143
|
+
var _a;
|
|
143
144
|
if (!isEmailValid.isEmailValid(email)) {
|
|
144
145
|
throw new Error('Email is not valid');
|
|
145
146
|
}
|
|
@@ -147,16 +148,17 @@ const ConnectWithOtpProvider = ({ children }) => {
|
|
|
147
148
|
if (!mapProvider[effectiveEmailProvider].enabled) {
|
|
148
149
|
throw new Error('Email provider is not enabled');
|
|
149
150
|
}
|
|
150
|
-
const captchaToken = yield engageCaptchaIfNeeded('email');
|
|
151
|
+
const captchaToken = (_a = options.captchaToken) !== null && _a !== void 0 ? _a : (yield engageCaptchaIfNeeded('email'));
|
|
151
152
|
const verificationHandler = yield mapProvider[effectiveEmailProvider].handler(email, captchaToken);
|
|
152
153
|
lastVerificationHandlerRef.current = verificationHandler;
|
|
153
154
|
});
|
|
154
|
-
const connectWithSms = (
|
|
155
|
+
const connectWithSms = (phone_1, ...args_2) => _tslib.__awaiter(void 0, [phone_1, ...args_2], void 0, function* (phone, options = {}) {
|
|
156
|
+
var _b;
|
|
155
157
|
if (!isProviderEnabled.isProviderEnabled(providers, sdkApiCore.ProviderEnum.Sms)) {
|
|
156
158
|
throw new Error('SMS provider is not enabled');
|
|
157
159
|
}
|
|
158
160
|
const handler = createSmsHandler.createSmsHandler(environmentId, embeddedWalletSessionKeys);
|
|
159
|
-
const captchaToken = yield engageCaptchaIfNeeded('phone');
|
|
161
|
+
const captchaToken = (_b = options.captchaToken) !== null && _b !== void 0 ? _b : (yield engageCaptchaIfNeeded('phone'));
|
|
160
162
|
const verificationHandler = yield handler(phone, captchaToken);
|
|
161
163
|
lastVerificationHandlerRef.current = verificationHandler;
|
|
162
164
|
});
|
|
@@ -135,7 +135,8 @@ const ConnectWithOtpProvider = ({ children }) => {
|
|
|
135
135
|
}),
|
|
136
136
|
});
|
|
137
137
|
});
|
|
138
|
-
const connectWithEmail = (
|
|
138
|
+
const connectWithEmail = (email_1, ...args_1) => __awaiter(void 0, [email_1, ...args_1], void 0, function* (email, options = {}) {
|
|
139
|
+
var _a;
|
|
139
140
|
if (!isEmailValid(email)) {
|
|
140
141
|
throw new Error('Email is not valid');
|
|
141
142
|
}
|
|
@@ -143,16 +144,17 @@ const ConnectWithOtpProvider = ({ children }) => {
|
|
|
143
144
|
if (!mapProvider[effectiveEmailProvider].enabled) {
|
|
144
145
|
throw new Error('Email provider is not enabled');
|
|
145
146
|
}
|
|
146
|
-
const captchaToken = yield engageCaptchaIfNeeded('email');
|
|
147
|
+
const captchaToken = (_a = options.captchaToken) !== null && _a !== void 0 ? _a : (yield engageCaptchaIfNeeded('email'));
|
|
147
148
|
const verificationHandler = yield mapProvider[effectiveEmailProvider].handler(email, captchaToken);
|
|
148
149
|
lastVerificationHandlerRef.current = verificationHandler;
|
|
149
150
|
});
|
|
150
|
-
const connectWithSms = (
|
|
151
|
+
const connectWithSms = (phone_1, ...args_2) => __awaiter(void 0, [phone_1, ...args_2], void 0, function* (phone, options = {}) {
|
|
152
|
+
var _b;
|
|
151
153
|
if (!isProviderEnabled(providers, ProviderEnum.Sms)) {
|
|
152
154
|
throw new Error('SMS provider is not enabled');
|
|
153
155
|
}
|
|
154
156
|
const handler = createSmsHandler(environmentId, embeddedWalletSessionKeys);
|
|
155
|
-
const captchaToken = yield engageCaptchaIfNeeded('phone');
|
|
157
|
+
const captchaToken = (_b = options.captchaToken) !== null && _b !== void 0 ? _b : (yield engageCaptchaIfNeeded('phone'));
|
|
156
158
|
const verificationHandler = yield handler(phone, captchaToken);
|
|
157
159
|
lastVerificationHandlerRef.current = verificationHandler;
|
|
158
160
|
});
|
|
@@ -37,7 +37,11 @@ const useRemoveWallet = ({ secondaryWallets, handleLogOut, setPrimaryWallet, })
|
|
|
37
37
|
const { removedWalletsIds, userWallets } = UserWalletsContext.useInternalUserWallets();
|
|
38
38
|
const connectedWalletsInfo$1 = connectedWalletsInfo.useConnectedWalletsInfo();
|
|
39
39
|
const nextWalletId = React.useMemo(() => (secondaryWallets[0] ? secondaryWallets[0].id : undefined), [secondaryWallets]);
|
|
40
|
-
const
|
|
40
|
+
const onLastWalletRemoved = React.useCallback((clearStackAndPushInitialView) => {
|
|
41
|
+
primaryWalletId.resetPrimaryWalletId();
|
|
42
|
+
clearStackAndPushInitialView === null || clearStackAndPushInitialView === void 0 ? void 0 : clearStackAndPushInitialView();
|
|
43
|
+
}, []);
|
|
44
|
+
const callback = React.useCallback((walletId, clearStackAndPushInitialView) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
41
45
|
var _a;
|
|
42
46
|
const wallet = userWallets.find((w) => w.id === walletId);
|
|
43
47
|
if (!wallet)
|
|
@@ -45,8 +49,9 @@ const useRemoveWallet = ({ secondaryWallets, handleLogOut, setPrimaryWallet, })
|
|
|
45
49
|
const primaryWalletId$1 = primaryWalletId.getPrimaryWalletId();
|
|
46
50
|
const isUnlinkingPrimaryWallet = walletId === primaryWalletId$1;
|
|
47
51
|
const authMode$1 = authMode.getAuthMode();
|
|
52
|
+
const user = (_a = client.getDynamicClient()) === null || _a === void 0 ? void 0 : _a.user;
|
|
48
53
|
if (authMode$1 === 'connect-and-sign') {
|
|
49
|
-
const isLastVerifiedCredential = (
|
|
54
|
+
const isLastVerifiedCredential = (user === null || user === void 0 ? void 0 : user.verifiedCredentials.length) === 1;
|
|
50
55
|
if (isLastVerifiedCredential) {
|
|
51
56
|
throw new utils.DynamicError('This is your only login method. Add another wallet or log in method before removing it.');
|
|
52
57
|
}
|
|
@@ -71,6 +76,10 @@ const useRemoveWallet = ({ secondaryWallets, handleLogOut, setPrimaryWallet, })
|
|
|
71
76
|
if (isUnlinkingPrimaryWallet && nextWalletId) {
|
|
72
77
|
setPrimaryWallet(nextWalletId);
|
|
73
78
|
}
|
|
79
|
+
// If there are no wallets left and no user, we need to reset the primary wallet and clear the view stack
|
|
80
|
+
if (!nextWalletId) {
|
|
81
|
+
onLastWalletRemoved(clearStackAndPushInitialView);
|
|
82
|
+
}
|
|
74
83
|
const numberOfWalletsWithSameConnector = userWallets.filter(({ connector }) => connector.key === wallet.connector.key).length;
|
|
75
84
|
// If there's only 1, it's the one being removed and we can kill the session
|
|
76
85
|
if (numberOfWalletsWithSameConnector === 1) {
|
|
@@ -82,6 +91,7 @@ const useRemoveWallet = ({ secondaryWallets, handleLogOut, setPrimaryWallet, })
|
|
|
82
91
|
nextWalletId,
|
|
83
92
|
removedWalletsIds,
|
|
84
93
|
setPrimaryWallet,
|
|
94
|
+
onLastWalletRemoved,
|
|
85
95
|
]);
|
|
86
96
|
return callback;
|
|
87
97
|
};
|
|
@@ -4,4 +4,4 @@ export type UseRemoveWalletProps = {
|
|
|
4
4
|
handleLogOut: () => void;
|
|
5
5
|
setPrimaryWallet: (walletId: string) => void;
|
|
6
6
|
};
|
|
7
|
-
export declare const useRemoveWallet: ({ secondaryWallets, handleLogOut, setPrimaryWallet, }: UseRemoveWalletProps) => (walletId: string) => Promise<void>;
|
|
7
|
+
export declare const useRemoveWallet: ({ secondaryWallets, handleLogOut, setPrimaryWallet, }: UseRemoveWalletProps) => (walletId: string, clearStackAndPushInitialView?: () => void) => Promise<void>;
|
|
@@ -19,7 +19,7 @@ import '@dynamic-labs/wallet-book';
|
|
|
19
19
|
import '../../../../shared/consts/index.js';
|
|
20
20
|
import '../../../../store/state/nonce/nonce.js';
|
|
21
21
|
import { getEnvironmentId } from '../../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
22
|
-
import { getPrimaryWalletId } from '../../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
22
|
+
import { resetPrimaryWalletId, getPrimaryWalletId } from '../../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
23
23
|
import { useConnectedWalletsInfo, setConnectedWalletsInfo } from '../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
24
24
|
import '../../../../events/dynamicEvents.js';
|
|
25
25
|
import '../../../../store/state/projectSettings/projectSettings.js';
|
|
@@ -33,7 +33,11 @@ const useRemoveWallet = ({ secondaryWallets, handleLogOut, setPrimaryWallet, })
|
|
|
33
33
|
const { removedWalletsIds, userWallets } = useInternalUserWallets();
|
|
34
34
|
const connectedWalletsInfo = useConnectedWalletsInfo();
|
|
35
35
|
const nextWalletId = useMemo(() => (secondaryWallets[0] ? secondaryWallets[0].id : undefined), [secondaryWallets]);
|
|
36
|
-
const
|
|
36
|
+
const onLastWalletRemoved = useCallback((clearStackAndPushInitialView) => {
|
|
37
|
+
resetPrimaryWalletId();
|
|
38
|
+
clearStackAndPushInitialView === null || clearStackAndPushInitialView === void 0 ? void 0 : clearStackAndPushInitialView();
|
|
39
|
+
}, []);
|
|
40
|
+
const callback = useCallback((walletId, clearStackAndPushInitialView) => __awaiter(void 0, void 0, void 0, function* () {
|
|
37
41
|
var _a;
|
|
38
42
|
const wallet = userWallets.find((w) => w.id === walletId);
|
|
39
43
|
if (!wallet)
|
|
@@ -41,8 +45,9 @@ const useRemoveWallet = ({ secondaryWallets, handleLogOut, setPrimaryWallet, })
|
|
|
41
45
|
const primaryWalletId = getPrimaryWalletId();
|
|
42
46
|
const isUnlinkingPrimaryWallet = walletId === primaryWalletId;
|
|
43
47
|
const authMode = getAuthMode();
|
|
48
|
+
const user = (_a = getDynamicClient()) === null || _a === void 0 ? void 0 : _a.user;
|
|
44
49
|
if (authMode === 'connect-and-sign') {
|
|
45
|
-
const isLastVerifiedCredential = (
|
|
50
|
+
const isLastVerifiedCredential = (user === null || user === void 0 ? void 0 : user.verifiedCredentials.length) === 1;
|
|
46
51
|
if (isLastVerifiedCredential) {
|
|
47
52
|
throw new DynamicError('This is your only login method. Add another wallet or log in method before removing it.');
|
|
48
53
|
}
|
|
@@ -67,6 +72,10 @@ const useRemoveWallet = ({ secondaryWallets, handleLogOut, setPrimaryWallet, })
|
|
|
67
72
|
if (isUnlinkingPrimaryWallet && nextWalletId) {
|
|
68
73
|
setPrimaryWallet(nextWalletId);
|
|
69
74
|
}
|
|
75
|
+
// If there are no wallets left and no user, we need to reset the primary wallet and clear the view stack
|
|
76
|
+
if (!nextWalletId) {
|
|
77
|
+
onLastWalletRemoved(clearStackAndPushInitialView);
|
|
78
|
+
}
|
|
70
79
|
const numberOfWalletsWithSameConnector = userWallets.filter(({ connector }) => connector.key === wallet.connector.key).length;
|
|
71
80
|
// If there's only 1, it's the one being removed and we can kill the session
|
|
72
81
|
if (numberOfWalletsWithSameConnector === 1) {
|
|
@@ -78,6 +87,7 @@ const useRemoveWallet = ({ secondaryWallets, handleLogOut, setPrimaryWallet, })
|
|
|
78
87
|
nextWalletId,
|
|
79
88
|
removedWalletsIds,
|
|
80
89
|
setPrimaryWallet,
|
|
90
|
+
onLastWalletRemoved,
|
|
81
91
|
]);
|
|
82
92
|
return callback;
|
|
83
93
|
};
|
|
@@ -62,7 +62,7 @@ export interface IDynamicContext {
|
|
|
62
62
|
getConnectedWalletById: (walletId: string) => Wallet | undefined;
|
|
63
63
|
getNameService: (address?: string) => Promise<NameServiceData | undefined>;
|
|
64
64
|
handleLogOut: () => Promise<void>;
|
|
65
|
-
removeWallet: (walletId: string) => Promise<void>;
|
|
65
|
+
removeWallet: (walletId: string, clearStackAndPushInitialView?: () => void) => Promise<void>;
|
|
66
66
|
handlers?: DynamicHandlers;
|
|
67
67
|
isBridgeFlow: boolean;
|
|
68
68
|
/** Whether there is an instance of DynamicEmbeddedAuthFlow being rendered */
|
|
@@ -7,17 +7,18 @@ var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var sdkApiCore = require('@dynamic-labs/sdk-api-core');
|
|
9
9
|
var utils = require('@dynamic-labs/utils');
|
|
10
|
+
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
11
|
+
var dynamicEvents = require('../../../events/dynamicEvents.cjs');
|
|
10
12
|
require('@dynamic-labs-sdk/client/core');
|
|
11
13
|
require('@dynamic-labs-sdk/client');
|
|
12
14
|
require('../../../client/client.cjs');
|
|
13
|
-
require('../../constants/values.cjs');
|
|
15
|
+
var values = require('../../constants/values.cjs');
|
|
14
16
|
require('@dynamic-labs/multi-wallet');
|
|
15
17
|
require('../../../shared/logger.cjs');
|
|
16
18
|
require('../../constants/colors.cjs');
|
|
17
19
|
var getMinAuthToken = require('../../functions/getMinAuthToken/getMinAuthToken.cjs');
|
|
18
20
|
require('react-international-phone');
|
|
19
21
|
require('@dynamic-labs/iconic');
|
|
20
|
-
require('@dynamic-labs/wallet-connector-core');
|
|
21
22
|
require('react/jsx-runtime');
|
|
22
23
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
23
24
|
require('@dynamic-labs/wallet-book');
|
|
@@ -28,7 +29,6 @@ var updatePrimaryWalletId = require('../../functions/updatePrimaryWalletId/updat
|
|
|
28
29
|
require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
29
30
|
var dynamicContextProps = require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
30
31
|
require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
31
|
-
require('../../../events/dynamicEvents.cjs');
|
|
32
32
|
var projectSettings = require('../../../store/state/projectSettings/projectSettings.cjs');
|
|
33
33
|
var useOnboardingCompleteUser = require('../../../client/extension/user/useOnboardingCompleteUser/useOnboardingCompleteUser.cjs');
|
|
34
34
|
require('../../../context/DynamicContext/DynamicContext.cjs');
|
|
@@ -212,9 +212,29 @@ const useDynamicWaas = () => {
|
|
|
212
212
|
const refreshedUser = yield refresh();
|
|
213
213
|
if (refreshedUser) {
|
|
214
214
|
// Add new wallet IDs to trigger walletAdded events
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
const newWalletVerifiedCredentials = getNewVerifiedCredentialsFromDiff.getNewVerifiedCredentialsFromDiff(previousVerifiedCredentials, refreshedUser.verifiedCredentials).filter(({ format }) => format === sdkApiCore.JwtVerifiedCredentialFormatEnum.Blockchain);
|
|
216
|
+
newWalletVerifiedCredentials.forEach((walletVerifiedCredential) => {
|
|
217
|
+
var _a, _b, _c;
|
|
218
|
+
try {
|
|
219
|
+
const chain = values.VerifiedCredentialNameToChainEnum[(_a = walletVerifiedCredential === null || walletVerifiedCredential === void 0 ? void 0 : walletVerifiedCredential.chain) !== null && _a !== void 0 ? _a : ''];
|
|
220
|
+
const walletConnector = getWalletConnector(chain);
|
|
221
|
+
if (!walletConnector)
|
|
222
|
+
return;
|
|
223
|
+
const wallet = walletConnector.createWallet({
|
|
224
|
+
address: (_b = walletVerifiedCredential.address) !== null && _b !== void 0 ? _b : '',
|
|
225
|
+
chain,
|
|
226
|
+
connector: walletConnector,
|
|
227
|
+
id: walletVerifiedCredential.id,
|
|
228
|
+
isAuthenticated: true,
|
|
229
|
+
key: (_c = walletVerifiedCredential.walletName) !== null && _c !== void 0 ? _c : '',
|
|
230
|
+
});
|
|
231
|
+
dynamicEvents.dynamicEvents.emit('embeddedWalletCreated', wallet, walletVerifiedCredential, user);
|
|
232
|
+
}
|
|
233
|
+
catch (error) {
|
|
234
|
+
walletConnectorCore.logger.error(error);
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
const newWalletIds = newWalletVerifiedCredentials.map(({ id }) => id);
|
|
218
238
|
addedWalletsIds.current = addedWalletsIds.current.concat(newWalletIds);
|
|
219
239
|
if (primaryWalletAccount) {
|
|
220
240
|
const createdPrimaryWallet = refreshedUser.verifiedCredentials.find((wallet) => {
|
|
@@ -3,17 +3,18 @@ import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
|
3
3
|
import { useCallback, useMemo } from 'react';
|
|
4
4
|
import { EmbeddedWalletVersionEnum, JwtVerifiedCredentialFormatEnum, WalletProviderEnum } from '@dynamic-labs/sdk-api-core';
|
|
5
5
|
import { DynamicError } from '@dynamic-labs/utils';
|
|
6
|
+
import { logger } from '@dynamic-labs/wallet-connector-core';
|
|
7
|
+
import { dynamicEvents } from '../../../events/dynamicEvents.js';
|
|
6
8
|
import '@dynamic-labs-sdk/client/core';
|
|
7
9
|
import '@dynamic-labs-sdk/client';
|
|
8
10
|
import '../../../client/client.js';
|
|
9
|
-
import '../../constants/values.js';
|
|
11
|
+
import { VerifiedCredentialNameToChainEnum } from '../../constants/values.js';
|
|
10
12
|
import '@dynamic-labs/multi-wallet';
|
|
11
13
|
import '../../../shared/logger.js';
|
|
12
14
|
import '../../constants/colors.js';
|
|
13
15
|
import { getMinAuthToken } from '../../functions/getMinAuthToken/getMinAuthToken.js';
|
|
14
16
|
import 'react-international-phone';
|
|
15
17
|
import '@dynamic-labs/iconic';
|
|
16
|
-
import '@dynamic-labs/wallet-connector-core';
|
|
17
18
|
import 'react/jsx-runtime';
|
|
18
19
|
import '../../../context/ViewContext/ViewContext.js';
|
|
19
20
|
import '@dynamic-labs/wallet-book';
|
|
@@ -24,7 +25,6 @@ import { updatePrimaryWalletId } from '../../functions/updatePrimaryWalletId/upd
|
|
|
24
25
|
import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
25
26
|
import { useApiBaseUrl, useEnvironmentId } from '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
26
27
|
import '../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
27
|
-
import '../../../events/dynamicEvents.js';
|
|
28
28
|
import { useProjectSettings } from '../../../store/state/projectSettings/projectSettings.js';
|
|
29
29
|
import { useOnboardingCompleteUserProfile } from '../../../client/extension/user/useOnboardingCompleteUser/useOnboardingCompleteUser.js';
|
|
30
30
|
import '../../../context/DynamicContext/DynamicContext.js';
|
|
@@ -208,9 +208,29 @@ const useDynamicWaas = () => {
|
|
|
208
208
|
const refreshedUser = yield refresh();
|
|
209
209
|
if (refreshedUser) {
|
|
210
210
|
// Add new wallet IDs to trigger walletAdded events
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
|
|
211
|
+
const newWalletVerifiedCredentials = getNewVerifiedCredentialsFromDiff(previousVerifiedCredentials, refreshedUser.verifiedCredentials).filter(({ format }) => format === JwtVerifiedCredentialFormatEnum.Blockchain);
|
|
212
|
+
newWalletVerifiedCredentials.forEach((walletVerifiedCredential) => {
|
|
213
|
+
var _a, _b, _c;
|
|
214
|
+
try {
|
|
215
|
+
const chain = VerifiedCredentialNameToChainEnum[(_a = walletVerifiedCredential === null || walletVerifiedCredential === void 0 ? void 0 : walletVerifiedCredential.chain) !== null && _a !== void 0 ? _a : ''];
|
|
216
|
+
const walletConnector = getWalletConnector(chain);
|
|
217
|
+
if (!walletConnector)
|
|
218
|
+
return;
|
|
219
|
+
const wallet = walletConnector.createWallet({
|
|
220
|
+
address: (_b = walletVerifiedCredential.address) !== null && _b !== void 0 ? _b : '',
|
|
221
|
+
chain,
|
|
222
|
+
connector: walletConnector,
|
|
223
|
+
id: walletVerifiedCredential.id,
|
|
224
|
+
isAuthenticated: true,
|
|
225
|
+
key: (_c = walletVerifiedCredential.walletName) !== null && _c !== void 0 ? _c : '',
|
|
226
|
+
});
|
|
227
|
+
dynamicEvents.emit('embeddedWalletCreated', wallet, walletVerifiedCredential, user);
|
|
228
|
+
}
|
|
229
|
+
catch (error) {
|
|
230
|
+
logger.error(error);
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
const newWalletIds = newWalletVerifiedCredentials.map(({ id }) => id);
|
|
214
234
|
addedWalletsIds.current = addedWalletsIds.current.concat(newWalletIds);
|
|
215
235
|
if (primaryWalletAccount) {
|
|
216
236
|
const createdPrimaryWallet = refreshedUser.verifiedCredentials.find((wallet) => {
|
package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs
CHANGED
|
@@ -16,7 +16,7 @@ var key = require('../../../../shared/assets/key.cjs');
|
|
|
16
16
|
var unlink = require('../../../../shared/assets/unlink.cjs');
|
|
17
17
|
var walletV2 = require('../../../../shared/assets/wallet-v2.cjs');
|
|
18
18
|
require('@dynamic-labs/iconic');
|
|
19
|
-
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
19
|
+
var ViewContext = require('../../../../context/ViewContext/ViewContext.cjs');
|
|
20
20
|
require('@dynamic-labs/sdk-api-core');
|
|
21
21
|
var logger = require('../../../../shared/logger.cjs');
|
|
22
22
|
require('@dynamic-labs/wallet-book');
|
|
@@ -127,6 +127,7 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
127
127
|
/** Controls the [WalletDetailsCard] open state */
|
|
128
128
|
const [detailsCardOpen, setDetailsCardOpen] = React.useState(false);
|
|
129
129
|
const { primaryWallet, network, user, removeWallet } = useInternalDynamicContext.useInternalDynamicContext();
|
|
130
|
+
const { clearStackAndPushInitialView } = ViewContext.useViewContext();
|
|
130
131
|
const authMode$1 = authMode.useAuthMode();
|
|
131
132
|
const projectSettings$1 = projectSettings.useProjectSettings();
|
|
132
133
|
const { setDynamicWidgetView, headerAlert } = DynamicWidgetContext.useWidgetContext();
|
|
@@ -146,9 +147,9 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
146
147
|
const removePrimaryWallet = React.useCallback(() => {
|
|
147
148
|
const primaryWalletId$1 = primaryWalletId.getPrimaryWalletId();
|
|
148
149
|
if (primaryWalletId$1) {
|
|
149
|
-
removeWallet(primaryWalletId$1);
|
|
150
|
+
removeWallet(primaryWalletId$1, clearStackAndPushInitialView);
|
|
150
151
|
}
|
|
151
|
-
}, [removeWallet]);
|
|
152
|
+
}, [removeWallet, clearStackAndPushInitialView]);
|
|
152
153
|
const options = [
|
|
153
154
|
{
|
|
154
155
|
Icon: jsxRuntime.jsx(copy.ReactComponent, { width: DROPDOWN_ICON_SIZE, height: DROPDOWN_ICON_SIZE }),
|
package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js
CHANGED
|
@@ -12,7 +12,7 @@ import { ReactComponent as SvgKey } from '../../../../shared/assets/key.js';
|
|
|
12
12
|
import { ReactComponent as SvgUnlink } from '../../../../shared/assets/unlink.js';
|
|
13
13
|
import { ReactComponent as SvgWalletV2 } from '../../../../shared/assets/wallet-v2.js';
|
|
14
14
|
import '@dynamic-labs/iconic';
|
|
15
|
-
import '../../../../context/ViewContext/ViewContext.js';
|
|
15
|
+
import { useViewContext } from '../../../../context/ViewContext/ViewContext.js';
|
|
16
16
|
import '@dynamic-labs/sdk-api-core';
|
|
17
17
|
import { logger } from '../../../../shared/logger.js';
|
|
18
18
|
import '@dynamic-labs/wallet-book';
|
|
@@ -123,6 +123,7 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
123
123
|
/** Controls the [WalletDetailsCard] open state */
|
|
124
124
|
const [detailsCardOpen, setDetailsCardOpen] = useState(false);
|
|
125
125
|
const { primaryWallet, network, user, removeWallet } = useInternalDynamicContext();
|
|
126
|
+
const { clearStackAndPushInitialView } = useViewContext();
|
|
126
127
|
const authMode = useAuthMode();
|
|
127
128
|
const projectSettings = useProjectSettings();
|
|
128
129
|
const { setDynamicWidgetView, headerAlert } = useWidgetContext();
|
|
@@ -142,9 +143,9 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
142
143
|
const removePrimaryWallet = useCallback(() => {
|
|
143
144
|
const primaryWalletId = getPrimaryWalletId();
|
|
144
145
|
if (primaryWalletId) {
|
|
145
|
-
removeWallet(primaryWalletId);
|
|
146
|
+
removeWallet(primaryWalletId, clearStackAndPushInitialView);
|
|
146
147
|
}
|
|
147
|
-
}, [removeWallet]);
|
|
148
|
+
}, [removeWallet, clearStackAndPushInitialView]);
|
|
148
149
|
const options = [
|
|
149
150
|
{
|
|
150
151
|
Icon: jsx(SvgCopy, { width: DROPDOWN_ICON_SIZE, height: DROPDOWN_ICON_SIZE }),
|
|
@@ -6,20 +6,24 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var _tslib = require('../../../../../../_virtual/_tslib.cjs');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var reactI18next = require('react-i18next');
|
|
9
|
+
require('@dynamic-labs/utils');
|
|
10
|
+
require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
9
11
|
require('react');
|
|
10
|
-
require('
|
|
11
|
-
require('../../../../
|
|
12
|
+
require('@dynamic-labs/iconic');
|
|
13
|
+
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
12
14
|
require('@dynamic-labs/sdk-api-core');
|
|
13
15
|
var logger = require('../../../../shared/logger.cjs');
|
|
14
|
-
require('@dynamic-labs/iconic');
|
|
15
16
|
require('@dynamic-labs/wallet-connector-core');
|
|
16
|
-
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
17
17
|
require('@dynamic-labs/wallet-book');
|
|
18
|
-
require('@dynamic-labs/utils');
|
|
19
18
|
require('../../../../utils/constants/colors.cjs');
|
|
20
19
|
require('../../../../utils/constants/values.cjs');
|
|
21
20
|
require('../../../../shared/consts/index.cjs');
|
|
21
|
+
require('../../../../components/Alert/Alert.cjs');
|
|
22
22
|
require('../../../../events/dynamicEvents.cjs');
|
|
23
|
+
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
24
|
+
require('../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
|
|
25
|
+
var authMode = require('../../../../store/state/authMode/authMode.cjs');
|
|
26
|
+
var useInternalDynamicContext = require('../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.cjs');
|
|
23
27
|
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
24
28
|
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
25
29
|
require('@dynamic-labs/multi-wallet');
|
|
@@ -37,7 +41,6 @@ require('../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs')
|
|
|
37
41
|
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
38
42
|
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
39
43
|
require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
40
|
-
var authMode = require('../../../../store/state/authMode/authMode.cjs');
|
|
41
44
|
require('../../../../context/VerificationContext/VerificationContext.cjs');
|
|
42
45
|
require('react-dom');
|
|
43
46
|
require('../../../../utils/functions/compareChains/compareChains.cjs');
|
|
@@ -57,53 +60,50 @@ require('../../../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
|
57
60
|
require('../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
58
61
|
require('@dynamic-labs/rpc-providers');
|
|
59
62
|
require('../../../../store/state/walletOptions/walletOptions.cjs');
|
|
60
|
-
require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
61
|
-
require('../../../../components/Alert/Alert.cjs');
|
|
62
63
|
var Typography = require('../../../../components/Typography/Typography.cjs');
|
|
64
|
+
require('../../../../context/FooterAnimationContext/index.cjs');
|
|
63
65
|
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
64
|
-
var TypographyButton = require('../../../../components/TypographyButton/TypographyButton.cjs');
|
|
65
|
-
require('../../../../components/IconButton/IconButton.cjs');
|
|
66
|
-
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
67
|
-
require('../../../../components/Input/Input.cjs');
|
|
68
|
-
require('../../../../components/IsBrowser/IsBrowser.cjs');
|
|
69
|
-
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
70
|
-
require('../../../../components/OverlayCard/OverlayCard.cjs');
|
|
71
66
|
require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
72
67
|
require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
73
68
|
require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
74
|
-
require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
75
|
-
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
76
|
-
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
77
|
-
require('react-focus-lock');
|
|
78
|
-
require('qrcode');
|
|
79
|
-
var useCloseMultiWalletPrompt = require('../../hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.cjs');
|
|
80
|
-
require('formik');
|
|
81
|
-
require('../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
|
|
82
|
-
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
83
|
-
require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
84
|
-
require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
85
|
-
require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
86
|
-
require('@hcaptcha/react-hcaptcha');
|
|
87
|
-
require('../../context/DynamicWidgetContext.cjs');
|
|
88
|
-
require('../../../../context/FooterAnimationContext/index.cjs');
|
|
89
|
-
require('../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
90
|
-
require('../../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
91
|
-
require('../../helpers/convertExchangeKeyAndProviderEnum.cjs');
|
|
92
|
-
require('../../../../store/state/sendBalances.cjs');
|
|
93
|
-
require('../../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
94
69
|
require('../../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
70
|
+
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
95
71
|
require('../../components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
96
72
|
var PromptModal = require('../../components/PromptModal/PromptModal.cjs');
|
|
97
73
|
var WidgetPortal = require('../../components/WidgetPortal/WidgetPortal.cjs');
|
|
74
|
+
var useCloseMultiWalletPrompt = require('../../hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.cjs');
|
|
75
|
+
require('../../context/DynamicWidgetContext.cjs');
|
|
76
|
+
require('../../../../components/IconButton/IconButton.cjs');
|
|
77
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
78
|
+
var TypographyButton = require('../../../../components/TypographyButton/TypographyButton.cjs');
|
|
79
|
+
require('formik');
|
|
80
|
+
require('../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
|
|
81
|
+
require('../../../../store/state/sendBalances.cjs');
|
|
82
|
+
require('../../../../components/Input/Input.cjs');
|
|
83
|
+
require('../../../../components/OverlayCard/OverlayCard.cjs');
|
|
98
84
|
require('../../../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
|
|
85
|
+
require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
86
|
+
require('../../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
99
87
|
require('../../components/PasskeyCard/PasskeyCard.cjs');
|
|
100
88
|
require('../../../../context/OnrampContext/OnrampContext.cjs');
|
|
89
|
+
require('../../helpers/convertExchangeKeyAndProviderEnum.cjs');
|
|
90
|
+
require('qrcode');
|
|
101
91
|
require('../../views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
102
92
|
require('../../../../../index.cjs');
|
|
93
|
+
require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
94
|
+
require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
95
|
+
require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
96
|
+
require('@hcaptcha/react-hcaptcha');
|
|
97
|
+
require('../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
98
|
+
require('../../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
103
99
|
require('../../../../store/state/tokenBalances.cjs');
|
|
104
100
|
require('../../../../store/state/multichainBalances.cjs');
|
|
105
101
|
require('../../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
|
|
106
|
-
|
|
102
|
+
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
103
|
+
require('../../../../components/IsBrowser/IsBrowser.cjs');
|
|
104
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
105
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
106
|
+
require('react-focus-lock');
|
|
107
107
|
|
|
108
108
|
const UnlinkWalletPopUpContent = ({ onClickCancel, }) => {
|
|
109
109
|
var _a;
|
|
@@ -2,20 +2,24 @@
|
|
|
2
2
|
import { __awaiter } from '../../../../../../_virtual/_tslib.js';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import '@dynamic-labs/utils';
|
|
6
|
+
import '../../../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
5
7
|
import 'react';
|
|
6
|
-
import '
|
|
7
|
-
import '../../../../
|
|
8
|
+
import '@dynamic-labs/iconic';
|
|
9
|
+
import '../../../../context/ViewContext/ViewContext.js';
|
|
8
10
|
import '@dynamic-labs/sdk-api-core';
|
|
9
11
|
import { logger } from '../../../../shared/logger.js';
|
|
10
|
-
import '@dynamic-labs/iconic';
|
|
11
12
|
import '@dynamic-labs/wallet-connector-core';
|
|
12
|
-
import '../../../../context/ViewContext/ViewContext.js';
|
|
13
13
|
import '@dynamic-labs/wallet-book';
|
|
14
|
-
import '@dynamic-labs/utils';
|
|
15
14
|
import '../../../../utils/constants/colors.js';
|
|
16
15
|
import '../../../../utils/constants/values.js';
|
|
17
16
|
import '../../../../shared/consts/index.js';
|
|
17
|
+
import '../../../../components/Alert/Alert.js';
|
|
18
18
|
import '../../../../events/dynamicEvents.js';
|
|
19
|
+
import '../../../../context/DynamicContext/DynamicContext.js';
|
|
20
|
+
import '../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
|
|
21
|
+
import { useAuthMode } from '../../../../store/state/authMode/authMode.js';
|
|
22
|
+
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.js';
|
|
19
23
|
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
20
24
|
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
21
25
|
import '@dynamic-labs/multi-wallet';
|
|
@@ -33,7 +37,6 @@ import '../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
|
33
37
|
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
34
38
|
import '../../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
35
39
|
import '../../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
36
|
-
import { useAuthMode } from '../../../../store/state/authMode/authMode.js';
|
|
37
40
|
import '../../../../context/VerificationContext/VerificationContext.js';
|
|
38
41
|
import 'react-dom';
|
|
39
42
|
import '../../../../utils/functions/compareChains/compareChains.js';
|
|
@@ -53,53 +56,50 @@ import '../../../../context/FieldsStateContext/FieldsStateContext.js';
|
|
|
53
56
|
import '../../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
54
57
|
import '@dynamic-labs/rpc-providers';
|
|
55
58
|
import '../../../../store/state/walletOptions/walletOptions.js';
|
|
56
|
-
import '../../../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
57
|
-
import '../../../../components/Alert/Alert.js';
|
|
58
59
|
import { Typography } from '../../../../components/Typography/Typography.js';
|
|
60
|
+
import '../../../../context/FooterAnimationContext/index.js';
|
|
59
61
|
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
60
|
-
import { TypographyButton } from '../../../../components/TypographyButton/TypographyButton.js';
|
|
61
|
-
import '../../../../components/IconButton/IconButton.js';
|
|
62
|
-
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
63
|
-
import '../../../../components/Input/Input.js';
|
|
64
|
-
import '../../../../components/IsBrowser/IsBrowser.js';
|
|
65
|
-
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
66
|
-
import '../../../../components/OverlayCard/OverlayCard.js';
|
|
67
62
|
import '../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
68
63
|
import '../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
69
64
|
import '../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
70
|
-
import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
71
|
-
import '../../../../components/Popper/Popper/Popper.js';
|
|
72
|
-
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
73
|
-
import 'react-focus-lock';
|
|
74
|
-
import 'qrcode';
|
|
75
|
-
import { useCloseMultiWalletPrompt } from '../../hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.js';
|
|
76
|
-
import 'formik';
|
|
77
|
-
import '../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
78
|
-
import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
79
|
-
import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
80
|
-
import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
81
|
-
import '../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
82
|
-
import '@hcaptcha/react-hcaptcha';
|
|
83
|
-
import '../../context/DynamicWidgetContext.js';
|
|
84
|
-
import '../../../../context/FooterAnimationContext/index.js';
|
|
85
|
-
import '../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
86
|
-
import '../../../../context/PasskeyContext/PasskeyContext.js';
|
|
87
|
-
import '../../helpers/convertExchangeKeyAndProviderEnum.js';
|
|
88
|
-
import '../../../../store/state/sendBalances.js';
|
|
89
|
-
import '../../../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
90
65
|
import '../../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.js';
|
|
66
|
+
import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
91
67
|
import '../../components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
92
68
|
import { PromptModal } from '../../components/PromptModal/PromptModal.js';
|
|
93
69
|
import { WidgetPortal } from '../../components/WidgetPortal/WidgetPortal.js';
|
|
70
|
+
import { useCloseMultiWalletPrompt } from '../../hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.js';
|
|
71
|
+
import '../../context/DynamicWidgetContext.js';
|
|
72
|
+
import '../../../../components/IconButton/IconButton.js';
|
|
73
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
74
|
+
import { TypographyButton } from '../../../../components/TypographyButton/TypographyButton.js';
|
|
75
|
+
import 'formik';
|
|
76
|
+
import '../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
77
|
+
import '../../../../store/state/sendBalances.js';
|
|
78
|
+
import '../../../../components/Input/Input.js';
|
|
79
|
+
import '../../../../components/OverlayCard/OverlayCard.js';
|
|
94
80
|
import '../../../../views/TransactionConfirmationView/TransactionConfirmationView.js';
|
|
81
|
+
import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
82
|
+
import '../../../../context/PasskeyContext/PasskeyContext.js';
|
|
95
83
|
import '../../components/PasskeyCard/PasskeyCard.js';
|
|
96
84
|
import '../../../../context/OnrampContext/OnrampContext.js';
|
|
85
|
+
import '../../helpers/convertExchangeKeyAndProviderEnum.js';
|
|
86
|
+
import 'qrcode';
|
|
97
87
|
import '../../views/ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
98
88
|
import '../../../../../index.js';
|
|
89
|
+
import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
90
|
+
import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
91
|
+
import '../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
92
|
+
import '@hcaptcha/react-hcaptcha';
|
|
93
|
+
import '../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
94
|
+
import '../../../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
99
95
|
import '../../../../store/state/tokenBalances.js';
|
|
100
96
|
import '../../../../store/state/multichainBalances.js';
|
|
101
97
|
import '../../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
102
|
-
import
|
|
98
|
+
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
99
|
+
import '../../../../components/IsBrowser/IsBrowser.js';
|
|
100
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
101
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
102
|
+
import 'react-focus-lock';
|
|
103
103
|
|
|
104
104
|
const UnlinkWalletPopUpContent = ({ onClickCancel, }) => {
|
|
105
105
|
var _a;
|