@dynamic-labs/sdk-react-core 4.47.1 → 4.47.3
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 +17 -0
- package/package.cjs +3 -3
- package/package.js +3 -3
- package/package.json +14 -14
- package/src/lib/client/extension/deprecated/mfa/verifyTotpMfaDevice/verifyTotpMfaDevice.d.ts +1 -1
- package/src/lib/client/extension/hooks/useInitializeSdkClient/useInitializeSdkClient.cjs +22 -4
- package/src/lib/client/extension/hooks/useInitializeSdkClient/useInitializeSdkClient.js +22 -4
- package/src/lib/client/extension/user/raiseUserProfileEvent/raiseUserProfileEvent.cjs +6 -6
- package/src/lib/client/extension/user/raiseUserProfileEvent/raiseUserProfileEvent.js +6 -6
- package/src/lib/components/PoweredByDynamic/PoweredByDynamic.cjs +6 -6
- package/src/lib/components/PoweredByDynamic/PoweredByDynamic.js +6 -6
- package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.cjs +5 -5
- package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.js +5 -5
- package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.cjs +5 -5
- package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.js +5 -5
- package/src/lib/context/DynamicContext/hooks/useRemoveWallet/useRemoveWallet.cjs +4 -4
- package/src/lib/context/DynamicContext/hooks/useRemoveWallet/useRemoveWallet.js +4 -4
- package/src/lib/context/ViewContext/ViewContext.cjs +6 -1
- package/src/lib/context/ViewContext/ViewContext.js +6 -1
- package/src/lib/data/api/api.cjs +9 -9
- package/src/lib/data/api/api.js +9 -9
- package/src/lib/data/api/externalAuth/externalAuth.cjs +4 -4
- package/src/lib/data/api/externalAuth/externalAuth.js +4 -4
- package/src/lib/data/api/oauth/oauth.cjs +4 -4
- package/src/lib/data/api/oauth/oauth.js +4 -4
- package/src/lib/data/api/user/user.cjs +4 -4
- package/src/lib/data/api/user/user.js +4 -4
- package/src/lib/data/api/wallets/wallets.cjs +4 -4
- package/src/lib/data/api/wallets/wallets.js +4 -4
- package/src/lib/shared/assets/index.d.ts +1 -0
- package/src/lib/shared/assets/reload-icon.cjs +54 -0
- package/src/lib/shared/assets/reload-icon.js +30 -0
- package/src/lib/store/state/connectedWalletsInfo/connectedWalletsInfo.cjs +6 -6
- package/src/lib/store/state/connectedWalletsInfo/connectedWalletsInfo.js +6 -6
- package/src/lib/store/state/nonce/nonce.cjs +4 -4
- package/src/lib/store/state/nonce/nonce.js +4 -4
- package/src/lib/store/utils/settingsUtils/settingsUtils.cjs +6 -6
- package/src/lib/store/utils/settingsUtils/settingsUtils.js +6 -6
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/isMfaMethodEnabled/isMfaMethodEnabled.cjs +6 -6
- package/src/lib/utils/functions/isMfaMethodEnabled/isMfaMethodEnabled.js +6 -6
- package/src/lib/utils/functions/updatePrimaryWalletId/updatePrimaryWalletId.cjs +5 -5
- package/src/lib/utils/functions/updatePrimaryWalletId/updatePrimaryWalletId.js +5 -5
- package/src/lib/utils/hooks/authenticationHooks/helpers/isConnectOnly.cjs +6 -6
- package/src/lib/utils/hooks/authenticationHooks/helpers/isConnectOnly.js +6 -6
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAllowClose/useAllowClose.cjs +6 -6
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAllowClose/useAllowClose.js +6 -6
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +6 -6
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +6 -6
- package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.cjs +5 -5
- package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.js +5 -5
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +4 -4
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +4 -4
- package/src/lib/utils/hooks/useDeleteUserAccount/useDeleteUserAccount.cjs +4 -4
- package/src/lib/utils/hooks/useDeleteUserAccount/useDeleteUserAccount.js +4 -4
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.cjs +4 -4
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.js +4 -4
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.cjs +16 -16
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.js +16 -16
- package/src/lib/utils/hooks/useEmbeddedWalletSessionKeys/useEmbeddedWalletSessionKeys.cjs +5 -5
- package/src/lib/utils/hooks/useEmbeddedWalletSessionKeys/useEmbeddedWalletSessionKeys.js +5 -5
- package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.cjs +4 -4
- package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.js +4 -4
- package/src/lib/utils/hooks/useFundingHelpers/useFundingHelpers.cjs +2 -1
- package/src/lib/utils/hooks/useFundingHelpers/useFundingHelpers.js +2 -1
- package/src/lib/utils/hooks/useGlobalLoading/useGlobalLoading.cjs +5 -5
- package/src/lib/utils/hooks/useGlobalLoading/useGlobalLoading.js +5 -5
- package/src/lib/utils/hooks/useIsLoadingEmbeddedWallet/useIsLoadingEmbeddedWallet.cjs +6 -6
- package/src/lib/utils/hooks/useIsLoadingEmbeddedWallet/useIsLoadingEmbeddedWallet.js +6 -6
- package/src/lib/utils/hooks/useIsPasskeysMfaEnabled/useIsPasskeysMfaEnabled.cjs +6 -6
- package/src/lib/utils/hooks/useIsPasskeysMfaEnabled/useIsPasskeysMfaEnabled.js +6 -6
- package/src/lib/utils/hooks/useIsTotpMfaEnabled/useIsTotpMfaEnabled.cjs +6 -6
- package/src/lib/utils/hooks/useIsTotpMfaEnabled/useIsTotpMfaEnabled.js +6 -6
- package/src/lib/utils/hooks/useMergeUserAccounts/useMergeUserAccounts.cjs +4 -4
- package/src/lib/utils/hooks/useMergeUserAccounts/useMergeUserAccounts.js +4 -4
- package/src/lib/utils/hooks/useMfa/useMfa.cjs +5 -5
- package/src/lib/utils/hooks/useMfa/useMfa.js +5 -5
- package/src/lib/utils/hooks/useMultichainTokenBalances/useMultichainTokenBalances.cjs +6 -6
- package/src/lib/utils/hooks/useMultichainTokenBalances/useMultichainTokenBalances.js +6 -6
- package/src/lib/utils/hooks/usePayWithDynamic/usePayWithDynamic.cjs +5 -5
- package/src/lib/utils/hooks/usePayWithDynamic/usePayWithDynamic.js +5 -5
- package/src/lib/utils/hooks/usePromptMfaAuth/usePromptMfaAuth.cjs +25 -27
- package/src/lib/utils/hooks/usePromptMfaAuth/usePromptMfaAuth.js +25 -27
- package/src/lib/utils/hooks/useRefreshUser/useRefreshUser.cjs +4 -4
- package/src/lib/utils/hooks/useRefreshUser/useRefreshUser.js +4 -4
- package/src/lib/utils/hooks/useSendDynamicProps/useSendDynamicProps.cjs +4 -4
- package/src/lib/utils/hooks/useSendDynamicProps/useSendDynamicProps.js +4 -4
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +3 -3
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +3 -3
- package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.cjs +5 -5
- package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.js +5 -5
- package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.cjs +6 -6
- package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.js +6 -6
- package/src/lib/utils/hooks/useTransferWallet/useTransferWallet.cjs +5 -5
- package/src/lib/utils/hooks/useTransferWallet/useTransferWallet.js +5 -5
- package/src/lib/utils/hooks/useUpgradeEmbeddedWallet/useUpgradeEmbeddedWallet.cjs +6 -6
- package/src/lib/utils/hooks/useUpgradeEmbeddedWallet/useUpgradeEmbeddedWallet.js +6 -6
- package/src/lib/utils/hooks/useUserAuth/useUserAuth.cjs +4 -4
- package/src/lib/utils/hooks/useUserAuth/useUserAuth.js +4 -4
- package/src/lib/utils/hooks/useValidateSession/handleWalletInfoOutOfSync/handleWalletInfoOutOfSync.cjs +5 -5
- package/src/lib/utils/hooks/useValidateSession/handleWalletInfoOutOfSync/handleWalletInfoOutOfSync.js +5 -5
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.cjs +5 -5
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.js +5 -5
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.cjs +4 -3
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.d.ts +3 -20
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.js +4 -3
- package/src/lib/views/EmailVerification/EmailVerification.cjs +7 -7
- package/src/lib/views/EmailVerification/EmailVerification.js +7 -7
- package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.cjs +9 -9
- package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.js +9 -9
- package/src/lib/views/ExchangeList/ExchangeList.cjs +6 -6
- package/src/lib/views/ExchangeList/ExchangeList.js +6 -6
- package/src/lib/views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.cjs +5 -5
- package/src/lib/views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.js +5 -5
- package/src/lib/views/MfaVerificationView/MfaVerificationView.cjs +4 -4
- package/src/lib/views/MfaVerificationView/MfaVerificationView.js +4 -4
- package/src/lib/views/Passkey/utils/createEmbeddedWalletRequest/createEmbeddedWalletRequest.cjs +5 -5
- package/src/lib/views/Passkey/utils/createEmbeddedWalletRequest/createEmbeddedWalletRequest.js +5 -5
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.cjs +25 -25
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.js +25 -25
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/ActiveWalletBalance.cjs +42 -2
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/ActiveWalletBalance.js +42 -2
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs +6 -6
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js +6 -6
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/ZKSyncSessionsSection/ZKSyncSessionsSection.cjs +6 -6
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/ZKSyncSessionsSection/ZKSyncSessionsSection.js +6 -6
- package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/getPromptAmountParams/getPromptAmountParams.cjs +5 -5
- package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/getPromptAmountParams/getPromptAmountParams.js +5 -5
- package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useStartExchangeFunding/useStartExchangeFunding.cjs +5 -5
- package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useStartExchangeFunding/useStartExchangeFunding.js +5 -5
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +6 -6
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +6 -6
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupView.cjs +5 -5
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupView.js +5 -5
|
@@ -6,18 +6,18 @@ import '@dynamic-labs/sdk-api-core';
|
|
|
6
6
|
import '../../../client/client.js';
|
|
7
7
|
import '@dynamic-labs-sdk/client';
|
|
8
8
|
import '../../../config/ApiEndpoint.js';
|
|
9
|
-
import '../../constants/values.js';
|
|
10
|
-
import '@dynamic-labs/utils';
|
|
11
|
-
import '@dynamic-labs/multi-wallet';
|
|
12
|
-
import 'react-international-phone';
|
|
13
|
-
import '../../constants/colors.js';
|
|
14
9
|
import '@dynamic-labs/iconic';
|
|
15
10
|
import '@dynamic-labs/wallet-connector-core';
|
|
16
11
|
import 'react/jsx-runtime';
|
|
17
12
|
import '../../../context/ViewContext/ViewContext.js';
|
|
18
13
|
import { logger } from '../../../shared/logger.js';
|
|
19
14
|
import '@dynamic-labs/wallet-book';
|
|
15
|
+
import '@dynamic-labs/utils';
|
|
16
|
+
import '../../constants/colors.js';
|
|
17
|
+
import '../../constants/values.js';
|
|
20
18
|
import '../../../shared/consts/index.js';
|
|
19
|
+
import '@dynamic-labs/multi-wallet';
|
|
20
|
+
import 'react-international-phone';
|
|
21
21
|
import '../../../store/state/nonce/nonce.js';
|
|
22
22
|
import '@dynamic-labs/locale';
|
|
23
23
|
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
@@ -5,7 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
7
7
|
var React = require('react');
|
|
8
|
+
var client$1 = require('@dynamic-labs-sdk/client');
|
|
8
9
|
var sdkApiCore = require('@dynamic-labs/sdk-api-core');
|
|
10
|
+
var utils = require('@dynamic-labs/utils');
|
|
9
11
|
var useGetUserMfaMethods = require('../useGetUserMfaMethods/useGetUserMfaMethods.cjs');
|
|
10
12
|
var ViewContext = require('../../../context/ViewContext/ViewContext.cjs');
|
|
11
13
|
require('../../../context/DynamicContext/DynamicContext.cjs');
|
|
@@ -15,11 +17,10 @@ require('@dynamic-labs/wallet-connector-core');
|
|
|
15
17
|
require('react/jsx-runtime');
|
|
16
18
|
require('../../../shared/logger.cjs');
|
|
17
19
|
require('@dynamic-labs/wallet-book');
|
|
18
|
-
require('@dynamic-labs/utils');
|
|
19
20
|
require('../../constants/colors.cjs');
|
|
20
21
|
require('../../constants/values.cjs');
|
|
21
22
|
require('../../../shared/consts/index.cjs');
|
|
22
|
-
require('../../../events/dynamicEvents.cjs');
|
|
23
|
+
var dynamicEvents = require('../../../events/dynamicEvents.cjs');
|
|
23
24
|
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
24
25
|
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
25
26
|
require('@dynamic-labs/multi-wallet');
|
|
@@ -27,7 +28,6 @@ require('react-international-phone');
|
|
|
27
28
|
require('../../../store/state/nonce/nonce.cjs');
|
|
28
29
|
require('@dynamic-labs-sdk/client/core');
|
|
29
30
|
var client = require('../../../client/client.cjs');
|
|
30
|
-
require('@dynamic-labs-sdk/client');
|
|
31
31
|
require('../../../config/ApiEndpoint.cjs');
|
|
32
32
|
require('@dynamic-labs/locale');
|
|
33
33
|
require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
@@ -116,8 +116,8 @@ const usePromptMfaAuth = () => {
|
|
|
116
116
|
...methods.passkeys.map((passkey) => (Object.assign(Object.assign({}, passkey), { type: sdkApiCore.MFADeviceType.Passkey }))),
|
|
117
117
|
...methods.devices.map((device) => (Object.assign(Object.assign({}, device), { type: sdkApiCore.MFADeviceType.Totp }))),
|
|
118
118
|
];
|
|
119
|
-
setShowAuthFlow(true);
|
|
120
119
|
if (!methods.userHasVerifiedMfaMethods || allMethods.length === 0) {
|
|
120
|
+
setShowAuthFlow(true);
|
|
121
121
|
pushView('mfa-choose-device', {
|
|
122
122
|
createMfaToken: props === null || props === void 0 ? void 0 : props.createMfaToken,
|
|
123
123
|
});
|
|
@@ -142,6 +142,7 @@ const usePromptMfaAuth = () => {
|
|
|
142
142
|
const authenticatePasskeyPromise = authenticatePasskeyMFA({
|
|
143
143
|
createMfaToken: createMfaTokenOptions,
|
|
144
144
|
});
|
|
145
|
+
setShowAuthFlow(true);
|
|
145
146
|
pushView('passkey-confirm', {
|
|
146
147
|
authenticatePasskeyPromise,
|
|
147
148
|
createMfaToken: props === null || props === void 0 ? void 0 : props.createMfaToken,
|
|
@@ -150,39 +151,36 @@ const usePromptMfaAuth = () => {
|
|
|
150
151
|
return authenticatePasskeyPromise;
|
|
151
152
|
}
|
|
152
153
|
case sdkApiCore.MFADeviceType.Totp: {
|
|
154
|
+
if (dynamicClient === null || dynamicClient === void 0 ? void 0 : dynamicClient.mfaToken) {
|
|
155
|
+
return dynamicClient === null || dynamicClient === void 0 ? void 0 : dynamicClient.mfaToken;
|
|
156
|
+
}
|
|
157
|
+
// If the mfaToken is not present, we need to open the MFA UI and wait for it to be available
|
|
158
|
+
const deferred = new utils.DeferredPromise();
|
|
159
|
+
// Open the MFA UI if the mfaToken is not available yet
|
|
160
|
+
setShowAuthFlow(true);
|
|
153
161
|
pushView('mfa-verification', {
|
|
154
162
|
createMfaToken: props === null || props === void 0 ? void 0 : props.createMfaToken,
|
|
155
163
|
});
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
else if (attempts >= maxAttempts) {
|
|
169
|
-
reject(new Error('MFA token not available after maximum retry attempts'));
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
// Exponential backoff with a maximum delay
|
|
173
|
-
const delay = Math.min(initialDelay * Math.pow(1.5, attempts - 1), maxDelay);
|
|
174
|
-
setTimeout(checkForToken, delay);
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
checkForToken();
|
|
164
|
+
const mfaCompletionSuccessOff = client$1.onEvent({
|
|
165
|
+
event: 'mfaCompletionSuccess',
|
|
166
|
+
listener: ({ mfaToken }) => deferred.resolve(mfaToken),
|
|
167
|
+
}, dynamicClient);
|
|
168
|
+
// Reject the promise if the auth flow is closed
|
|
169
|
+
const onAuthFlowCloseHandler = () => deferred.reject(new Error('MFA view closed'));
|
|
170
|
+
dynamicEvents.dynamicEvents.on('authFlowClose', onAuthFlowCloseHandler);
|
|
171
|
+
// Cleanup the event listeners
|
|
172
|
+
deferred.promise.finally(() => {
|
|
173
|
+
mfaCompletionSuccessOff();
|
|
174
|
+
dynamicEvents.dynamicEvents.off('authFlowClose', onAuthFlowCloseHandler);
|
|
178
175
|
});
|
|
176
|
+
return deferred.promise;
|
|
179
177
|
}
|
|
180
178
|
default:
|
|
181
179
|
throw new Error('Error determining MFA method to use');
|
|
182
180
|
}
|
|
183
181
|
}), [
|
|
184
182
|
authenticatePasskeyMFA,
|
|
185
|
-
dynamicClient
|
|
183
|
+
dynamicClient,
|
|
186
184
|
getUserMfaMethods,
|
|
187
185
|
pushView,
|
|
188
186
|
setShowAuthFlow,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
|
+
import { onEvent } from '@dynamic-labs-sdk/client';
|
|
4
5
|
import { MFADeviceType } from '@dynamic-labs/sdk-api-core';
|
|
6
|
+
import { DeferredPromise } from '@dynamic-labs/utils';
|
|
5
7
|
import { useGetUserMfaMethods } from '../useGetUserMfaMethods/useGetUserMfaMethods.js';
|
|
6
8
|
import { useViewContext } from '../../../context/ViewContext/ViewContext.js';
|
|
7
9
|
import '../../../context/DynamicContext/DynamicContext.js';
|
|
@@ -11,11 +13,10 @@ import '@dynamic-labs/wallet-connector-core';
|
|
|
11
13
|
import 'react/jsx-runtime';
|
|
12
14
|
import '../../../shared/logger.js';
|
|
13
15
|
import '@dynamic-labs/wallet-book';
|
|
14
|
-
import '@dynamic-labs/utils';
|
|
15
16
|
import '../../constants/colors.js';
|
|
16
17
|
import '../../constants/values.js';
|
|
17
18
|
import '../../../shared/consts/index.js';
|
|
18
|
-
import '../../../events/dynamicEvents.js';
|
|
19
|
+
import { dynamicEvents } from '../../../events/dynamicEvents.js';
|
|
19
20
|
import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
20
21
|
import '../../../context/ErrorContext/ErrorContext.js';
|
|
21
22
|
import '@dynamic-labs/multi-wallet';
|
|
@@ -23,7 +24,6 @@ import 'react-international-phone';
|
|
|
23
24
|
import '../../../store/state/nonce/nonce.js';
|
|
24
25
|
import '@dynamic-labs-sdk/client/core';
|
|
25
26
|
import { useDynamicClient } from '../../../client/client.js';
|
|
26
|
-
import '@dynamic-labs-sdk/client';
|
|
27
27
|
import '../../../config/ApiEndpoint.js';
|
|
28
28
|
import '@dynamic-labs/locale';
|
|
29
29
|
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
@@ -112,8 +112,8 @@ const usePromptMfaAuth = () => {
|
|
|
112
112
|
...methods.passkeys.map((passkey) => (Object.assign(Object.assign({}, passkey), { type: MFADeviceType.Passkey }))),
|
|
113
113
|
...methods.devices.map((device) => (Object.assign(Object.assign({}, device), { type: MFADeviceType.Totp }))),
|
|
114
114
|
];
|
|
115
|
-
setShowAuthFlow(true);
|
|
116
115
|
if (!methods.userHasVerifiedMfaMethods || allMethods.length === 0) {
|
|
116
|
+
setShowAuthFlow(true);
|
|
117
117
|
pushView('mfa-choose-device', {
|
|
118
118
|
createMfaToken: props === null || props === void 0 ? void 0 : props.createMfaToken,
|
|
119
119
|
});
|
|
@@ -138,6 +138,7 @@ const usePromptMfaAuth = () => {
|
|
|
138
138
|
const authenticatePasskeyPromise = authenticatePasskeyMFA({
|
|
139
139
|
createMfaToken: createMfaTokenOptions,
|
|
140
140
|
});
|
|
141
|
+
setShowAuthFlow(true);
|
|
141
142
|
pushView('passkey-confirm', {
|
|
142
143
|
authenticatePasskeyPromise,
|
|
143
144
|
createMfaToken: props === null || props === void 0 ? void 0 : props.createMfaToken,
|
|
@@ -146,39 +147,36 @@ const usePromptMfaAuth = () => {
|
|
|
146
147
|
return authenticatePasskeyPromise;
|
|
147
148
|
}
|
|
148
149
|
case MFADeviceType.Totp: {
|
|
150
|
+
if (dynamicClient === null || dynamicClient === void 0 ? void 0 : dynamicClient.mfaToken) {
|
|
151
|
+
return dynamicClient === null || dynamicClient === void 0 ? void 0 : dynamicClient.mfaToken;
|
|
152
|
+
}
|
|
153
|
+
// If the mfaToken is not present, we need to open the MFA UI and wait for it to be available
|
|
154
|
+
const deferred = new DeferredPromise();
|
|
155
|
+
// Open the MFA UI if the mfaToken is not available yet
|
|
156
|
+
setShowAuthFlow(true);
|
|
149
157
|
pushView('mfa-verification', {
|
|
150
158
|
createMfaToken: props === null || props === void 0 ? void 0 : props.createMfaToken,
|
|
151
159
|
});
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
else if (attempts >= maxAttempts) {
|
|
165
|
-
reject(new Error('MFA token not available after maximum retry attempts'));
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
// Exponential backoff with a maximum delay
|
|
169
|
-
const delay = Math.min(initialDelay * Math.pow(1.5, attempts - 1), maxDelay);
|
|
170
|
-
setTimeout(checkForToken, delay);
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
checkForToken();
|
|
160
|
+
const mfaCompletionSuccessOff = onEvent({
|
|
161
|
+
event: 'mfaCompletionSuccess',
|
|
162
|
+
listener: ({ mfaToken }) => deferred.resolve(mfaToken),
|
|
163
|
+
}, dynamicClient);
|
|
164
|
+
// Reject the promise if the auth flow is closed
|
|
165
|
+
const onAuthFlowCloseHandler = () => deferred.reject(new Error('MFA view closed'));
|
|
166
|
+
dynamicEvents.on('authFlowClose', onAuthFlowCloseHandler);
|
|
167
|
+
// Cleanup the event listeners
|
|
168
|
+
deferred.promise.finally(() => {
|
|
169
|
+
mfaCompletionSuccessOff();
|
|
170
|
+
dynamicEvents.off('authFlowClose', onAuthFlowCloseHandler);
|
|
174
171
|
});
|
|
172
|
+
return deferred.promise;
|
|
175
173
|
}
|
|
176
174
|
default:
|
|
177
175
|
throw new Error('Error determining MFA method to use');
|
|
178
176
|
}
|
|
179
177
|
}), [
|
|
180
178
|
authenticatePasskeyMFA,
|
|
181
|
-
dynamicClient
|
|
179
|
+
dynamicClient,
|
|
182
180
|
getUserMfaMethods,
|
|
183
181
|
pushView,
|
|
184
182
|
setShowAuthFlow,
|
|
@@ -11,17 +11,17 @@ require('@dynamic-labs-sdk/client/core');
|
|
|
11
11
|
require('../../../client/client.cjs');
|
|
12
12
|
require('@dynamic-labs-sdk/client');
|
|
13
13
|
require('../../../config/ApiEndpoint.cjs');
|
|
14
|
-
require('../../constants/values.cjs');
|
|
15
|
-
require('@dynamic-labs/multi-wallet');
|
|
16
|
-
require('react-international-phone');
|
|
17
|
-
require('../../constants/colors.cjs');
|
|
18
14
|
require('@dynamic-labs/iconic');
|
|
19
15
|
require('@dynamic-labs/wallet-connector-core');
|
|
20
16
|
require('react/jsx-runtime');
|
|
21
17
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
22
18
|
require('../../../shared/logger.cjs');
|
|
23
19
|
require('@dynamic-labs/wallet-book');
|
|
20
|
+
require('../../constants/colors.cjs');
|
|
21
|
+
require('../../constants/values.cjs');
|
|
24
22
|
require('../../../shared/consts/index.cjs');
|
|
23
|
+
require('@dynamic-labs/multi-wallet');
|
|
24
|
+
require('react-international-phone');
|
|
25
25
|
require('../../../store/state/nonce/nonce.cjs');
|
|
26
26
|
var updatePrimaryWalletId = require('../../functions/updatePrimaryWalletId/updatePrimaryWalletId.cjs');
|
|
27
27
|
require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
@@ -7,17 +7,17 @@ import '@dynamic-labs-sdk/client/core';
|
|
|
7
7
|
import '../../../client/client.js';
|
|
8
8
|
import '@dynamic-labs-sdk/client';
|
|
9
9
|
import '../../../config/ApiEndpoint.js';
|
|
10
|
-
import '../../constants/values.js';
|
|
11
|
-
import '@dynamic-labs/multi-wallet';
|
|
12
|
-
import 'react-international-phone';
|
|
13
|
-
import '../../constants/colors.js';
|
|
14
10
|
import '@dynamic-labs/iconic';
|
|
15
11
|
import '@dynamic-labs/wallet-connector-core';
|
|
16
12
|
import 'react/jsx-runtime';
|
|
17
13
|
import '../../../context/ViewContext/ViewContext.js';
|
|
18
14
|
import '../../../shared/logger.js';
|
|
19
15
|
import '@dynamic-labs/wallet-book';
|
|
16
|
+
import '../../constants/colors.js';
|
|
17
|
+
import '../../constants/values.js';
|
|
20
18
|
import '../../../shared/consts/index.js';
|
|
19
|
+
import '@dynamic-labs/multi-wallet';
|
|
20
|
+
import 'react-international-phone';
|
|
21
21
|
import '../../../store/state/nonce/nonce.js';
|
|
22
22
|
import { updatePrimaryWalletId } from '../../functions/updatePrimaryWalletId/updatePrimaryWalletId.js';
|
|
23
23
|
import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
@@ -11,17 +11,17 @@ require('@dynamic-labs-sdk/client/core');
|
|
|
11
11
|
require('../../../client/client.cjs');
|
|
12
12
|
require('@dynamic-labs-sdk/client');
|
|
13
13
|
require('../../../config/ApiEndpoint.cjs');
|
|
14
|
-
require('../../constants/values.cjs');
|
|
15
|
-
require('@dynamic-labs/multi-wallet');
|
|
16
|
-
require('react-international-phone');
|
|
17
|
-
require('../../constants/colors.cjs');
|
|
18
14
|
require('@dynamic-labs/iconic');
|
|
19
15
|
require('@dynamic-labs/wallet-connector-core');
|
|
20
16
|
require('react/jsx-runtime');
|
|
21
17
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
22
18
|
var logger = require('../../../shared/logger.cjs');
|
|
23
19
|
require('@dynamic-labs/wallet-book');
|
|
20
|
+
require('../../constants/colors.cjs');
|
|
21
|
+
require('../../constants/values.cjs');
|
|
24
22
|
require('../../../shared/consts/index.cjs');
|
|
23
|
+
require('@dynamic-labs/multi-wallet');
|
|
24
|
+
require('react-international-phone');
|
|
25
25
|
require('../../../store/state/nonce/nonce.cjs');
|
|
26
26
|
var serializeWalletConnectors = require('../../functions/serializeWalletConnectors/serializeWalletConnectors.cjs');
|
|
27
27
|
require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
@@ -7,17 +7,17 @@ import '@dynamic-labs-sdk/client/core';
|
|
|
7
7
|
import '../../../client/client.js';
|
|
8
8
|
import '@dynamic-labs-sdk/client';
|
|
9
9
|
import '../../../config/ApiEndpoint.js';
|
|
10
|
-
import '../../constants/values.js';
|
|
11
|
-
import '@dynamic-labs/multi-wallet';
|
|
12
|
-
import 'react-international-phone';
|
|
13
|
-
import '../../constants/colors.js';
|
|
14
10
|
import '@dynamic-labs/iconic';
|
|
15
11
|
import '@dynamic-labs/wallet-connector-core';
|
|
16
12
|
import 'react/jsx-runtime';
|
|
17
13
|
import '../../../context/ViewContext/ViewContext.js';
|
|
18
14
|
import { logger } from '../../../shared/logger.js';
|
|
19
15
|
import '@dynamic-labs/wallet-book';
|
|
16
|
+
import '../../constants/colors.js';
|
|
17
|
+
import '../../constants/values.js';
|
|
20
18
|
import '../../../shared/consts/index.js';
|
|
19
|
+
import '@dynamic-labs/multi-wallet';
|
|
20
|
+
import 'react-international-phone';
|
|
21
21
|
import '../../../store/state/nonce/nonce.js';
|
|
22
22
|
import { serializeWalletConnectors } from '../../functions/serializeWalletConnectors/serializeWalletConnectors.js';
|
|
23
23
|
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
@@ -8,6 +8,7 @@ var React = require('react');
|
|
|
8
8
|
var sdkApiCore = require('@dynamic-labs/sdk-api-core');
|
|
9
9
|
var types = require('@dynamic-labs/types');
|
|
10
10
|
var utils = require('@dynamic-labs/utils');
|
|
11
|
+
var client = require('../../../client/client.cjs');
|
|
11
12
|
var CaptchaContext = require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
12
13
|
require('../../../context/DynamicContext/DynamicContext.cjs');
|
|
13
14
|
require('../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
|
|
@@ -32,7 +33,6 @@ var getProviderByType = require('../../functions/getProviderByType/getProviderBy
|
|
|
32
33
|
var nonce = require('../../../store/state/nonce/nonce.cjs');
|
|
33
34
|
var randomString = require('../../functions/randomString/randomString.cjs');
|
|
34
35
|
require('@dynamic-labs-sdk/client/core');
|
|
35
|
-
var client = require('../../../client/client.cjs');
|
|
36
36
|
require('@dynamic-labs-sdk/client');
|
|
37
37
|
require('../../../config/ApiEndpoint.cjs');
|
|
38
38
|
var oauth = require('../../../data/api/oauth/oauth.cjs');
|
|
@@ -501,7 +501,7 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
|
|
|
501
501
|
throw new utils.DynamicError('User is not logged in');
|
|
502
502
|
}
|
|
503
503
|
if (!((_g = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _g === void 0 ? void 0 : _g.enabled)) {
|
|
504
|
-
connectSocialAccount(props);
|
|
504
|
+
yield connectSocialAccount(props);
|
|
505
505
|
return;
|
|
506
506
|
}
|
|
507
507
|
// Make sure the auth flow is visible
|
|
@@ -513,7 +513,7 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
|
|
|
513
513
|
engageCaptcha({
|
|
514
514
|
authMethod: 'social',
|
|
515
515
|
onCaptchaSuccess: (captchaToken) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
516
|
-
connectSocialAccount(Object.assign(Object.assign({}, props), { captchaToken }));
|
|
516
|
+
yield connectSocialAccount(Object.assign(Object.assign({}, props), { captchaToken }));
|
|
517
517
|
setShowAuthFlow(false);
|
|
518
518
|
}),
|
|
519
519
|
});
|
|
@@ -4,6 +4,7 @@ import { useMemo, useState, useCallback } from 'react';
|
|
|
4
4
|
import { ProviderEnum } from '@dynamic-labs/sdk-api-core';
|
|
5
5
|
import { SocialOAuthErrorCode } from '@dynamic-labs/types';
|
|
6
6
|
import { SocialAccountAlreadyExistsError, tracing, PlatformService, isMobile, Oauth2Service, DynamicError } from '@dynamic-labs/utils';
|
|
7
|
+
import { getDynamicClient } from '../../../client/client.js';
|
|
7
8
|
import { useCaptchaContext } from '../../../context/CaptchaContext/CaptchaContext.js';
|
|
8
9
|
import '../../../context/DynamicContext/DynamicContext.js';
|
|
9
10
|
import '../../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
|
|
@@ -28,7 +29,6 @@ import { getProviderByType } from '../../functions/getProviderByType/getProvider
|
|
|
28
29
|
import { consumeNonce } from '../../../store/state/nonce/nonce.js';
|
|
29
30
|
import { randomString } from '../../functions/randomString/randomString.js';
|
|
30
31
|
import '@dynamic-labs-sdk/client/core';
|
|
31
|
-
import { getDynamicClient } from '../../../client/client.js';
|
|
32
32
|
import '@dynamic-labs-sdk/client';
|
|
33
33
|
import '../../../config/ApiEndpoint.js';
|
|
34
34
|
import { telegramSignIn, signInOAuth, telegramVerify, verifyOAuth, getOAuthResult, initAuth, farcasterSignIn, farcasterVerify } from '../../../data/api/oauth/oauth.js';
|
|
@@ -497,7 +497,7 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
|
|
|
497
497
|
throw new DynamicError('User is not logged in');
|
|
498
498
|
}
|
|
499
499
|
if (!((_g = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _g === void 0 ? void 0 : _g.enabled)) {
|
|
500
|
-
connectSocialAccount(props);
|
|
500
|
+
yield connectSocialAccount(props);
|
|
501
501
|
return;
|
|
502
502
|
}
|
|
503
503
|
// Make sure the auth flow is visible
|
|
@@ -509,7 +509,7 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
|
|
|
509
509
|
engageCaptcha({
|
|
510
510
|
authMethod: 'social',
|
|
511
511
|
onCaptchaSuccess: (captchaToken) => __awaiter(void 0, void 0, void 0, function* () {
|
|
512
|
-
connectSocialAccount(Object.assign(Object.assign({}, props), { captchaToken }));
|
|
512
|
+
yield connectSocialAccount(Object.assign(Object.assign({}, props), { captchaToken }));
|
|
513
513
|
setShowAuthFlow(false);
|
|
514
514
|
}),
|
|
515
515
|
});
|
|
@@ -10,18 +10,18 @@ require('@dynamic-labs-sdk/client/core');
|
|
|
10
10
|
require('@dynamic-labs/sdk-api-core');
|
|
11
11
|
require('@dynamic-labs-sdk/client');
|
|
12
12
|
require('../../../config/ApiEndpoint.cjs');
|
|
13
|
-
require('../../constants/values.cjs');
|
|
14
|
-
require('@dynamic-labs/utils');
|
|
15
|
-
require('@dynamic-labs/multi-wallet');
|
|
16
|
-
require('react-international-phone');
|
|
17
|
-
require('../../constants/colors.cjs');
|
|
18
13
|
require('@dynamic-labs/iconic');
|
|
19
14
|
require('@dynamic-labs/wallet-connector-core');
|
|
20
15
|
require('react/jsx-runtime');
|
|
21
16
|
var ViewContext = require('../../../context/ViewContext/ViewContext.cjs');
|
|
22
17
|
var logger = require('../../../shared/logger.cjs');
|
|
23
18
|
require('@dynamic-labs/wallet-book');
|
|
19
|
+
require('@dynamic-labs/utils');
|
|
20
|
+
require('../../constants/colors.cjs');
|
|
21
|
+
require('../../constants/values.cjs');
|
|
24
22
|
require('../../../shared/consts/index.cjs');
|
|
23
|
+
require('@dynamic-labs/multi-wallet');
|
|
24
|
+
require('react-international-phone');
|
|
25
25
|
require('../../../store/state/nonce/nonce.cjs');
|
|
26
26
|
require('@dynamic-labs/locale');
|
|
27
27
|
var dynamicContextProps = require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
@@ -6,18 +6,18 @@ import '@dynamic-labs-sdk/client/core';
|
|
|
6
6
|
import '@dynamic-labs/sdk-api-core';
|
|
7
7
|
import '@dynamic-labs-sdk/client';
|
|
8
8
|
import '../../../config/ApiEndpoint.js';
|
|
9
|
-
import '../../constants/values.js';
|
|
10
|
-
import '@dynamic-labs/utils';
|
|
11
|
-
import '@dynamic-labs/multi-wallet';
|
|
12
|
-
import 'react-international-phone';
|
|
13
|
-
import '../../constants/colors.js';
|
|
14
9
|
import '@dynamic-labs/iconic';
|
|
15
10
|
import '@dynamic-labs/wallet-connector-core';
|
|
16
11
|
import 'react/jsx-runtime';
|
|
17
12
|
import { useViewContext } from '../../../context/ViewContext/ViewContext.js';
|
|
18
13
|
import { logger } from '../../../shared/logger.js';
|
|
19
14
|
import '@dynamic-labs/wallet-book';
|
|
15
|
+
import '@dynamic-labs/utils';
|
|
16
|
+
import '../../constants/colors.js';
|
|
17
|
+
import '../../constants/values.js';
|
|
20
18
|
import '../../../shared/consts/index.js';
|
|
19
|
+
import '@dynamic-labs/multi-wallet';
|
|
20
|
+
import 'react-international-phone';
|
|
21
21
|
import '../../../store/state/nonce/nonce.js';
|
|
22
22
|
import '@dynamic-labs/locale';
|
|
23
23
|
import { useEnvironmentId } from '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
@@ -10,19 +10,19 @@ require('@dynamic-labs-sdk/client/core');
|
|
|
10
10
|
require('../../../client/client.cjs');
|
|
11
11
|
require('@dynamic-labs-sdk/client');
|
|
12
12
|
require('../../../config/ApiEndpoint.cjs');
|
|
13
|
-
require('../../constants/values.cjs');
|
|
14
|
-
require('@dynamic-labs/utils');
|
|
15
|
-
var errors = require('../../constants/errors.cjs');
|
|
16
|
-
require('@dynamic-labs/multi-wallet');
|
|
17
|
-
require('react-international-phone');
|
|
18
|
-
require('../../constants/colors.cjs');
|
|
19
13
|
require('@dynamic-labs/iconic');
|
|
20
14
|
require('@dynamic-labs/wallet-connector-core');
|
|
21
15
|
require('react/jsx-runtime');
|
|
22
16
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
23
17
|
var logger = require('../../../shared/logger.cjs');
|
|
24
18
|
require('@dynamic-labs/wallet-book');
|
|
19
|
+
require('@dynamic-labs/utils');
|
|
20
|
+
require('../../constants/colors.cjs');
|
|
21
|
+
require('../../constants/values.cjs');
|
|
25
22
|
require('../../../shared/consts/index.cjs');
|
|
23
|
+
var errors = require('../../constants/errors.cjs');
|
|
24
|
+
require('@dynamic-labs/multi-wallet');
|
|
25
|
+
require('react-international-phone');
|
|
26
26
|
require('../../../store/state/nonce/nonce.cjs');
|
|
27
27
|
var utils = require('../../../data/api/utils.cjs');
|
|
28
28
|
require('@dynamic-labs/locale');
|
|
@@ -6,19 +6,19 @@ import '@dynamic-labs-sdk/client/core';
|
|
|
6
6
|
import '../../../client/client.js';
|
|
7
7
|
import '@dynamic-labs-sdk/client';
|
|
8
8
|
import '../../../config/ApiEndpoint.js';
|
|
9
|
-
import '../../constants/values.js';
|
|
10
|
-
import '@dynamic-labs/utils';
|
|
11
|
-
import { USER_NOT_LOGGED_IN } from '../../constants/errors.js';
|
|
12
|
-
import '@dynamic-labs/multi-wallet';
|
|
13
|
-
import 'react-international-phone';
|
|
14
|
-
import '../../constants/colors.js';
|
|
15
9
|
import '@dynamic-labs/iconic';
|
|
16
10
|
import '@dynamic-labs/wallet-connector-core';
|
|
17
11
|
import 'react/jsx-runtime';
|
|
18
12
|
import '../../../context/ViewContext/ViewContext.js';
|
|
19
13
|
import { logger } from '../../../shared/logger.js';
|
|
20
14
|
import '@dynamic-labs/wallet-book';
|
|
15
|
+
import '@dynamic-labs/utils';
|
|
16
|
+
import '../../constants/colors.js';
|
|
17
|
+
import '../../constants/values.js';
|
|
21
18
|
import '../../../shared/consts/index.js';
|
|
19
|
+
import { USER_NOT_LOGGED_IN } from '../../constants/errors.js';
|
|
20
|
+
import '@dynamic-labs/multi-wallet';
|
|
21
|
+
import 'react-international-phone';
|
|
22
22
|
import '../../../store/state/nonce/nonce.js';
|
|
23
23
|
import { logResponseError } from '../../../data/api/utils.js';
|
|
24
24
|
import '@dynamic-labs/locale';
|
|
@@ -12,17 +12,17 @@ require('@dynamic-labs/sdk-api-core');
|
|
|
12
12
|
require('../../../client/client.cjs');
|
|
13
13
|
require('@dynamic-labs-sdk/client');
|
|
14
14
|
require('../../../config/ApiEndpoint.cjs');
|
|
15
|
-
require('../../constants/values.cjs');
|
|
16
|
-
var errors = require('../../constants/errors.cjs');
|
|
17
|
-
require('@dynamic-labs/multi-wallet');
|
|
18
|
-
require('react-international-phone');
|
|
19
|
-
require('../../constants/colors.cjs');
|
|
20
15
|
require('@dynamic-labs/iconic');
|
|
21
16
|
require('react/jsx-runtime');
|
|
22
17
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
23
18
|
var logger = require('../../../shared/logger.cjs');
|
|
24
19
|
require('@dynamic-labs/wallet-book');
|
|
20
|
+
require('../../constants/colors.cjs');
|
|
21
|
+
require('../../constants/values.cjs');
|
|
25
22
|
require('../../../shared/consts/index.cjs');
|
|
23
|
+
var errors = require('../../constants/errors.cjs');
|
|
24
|
+
require('@dynamic-labs/multi-wallet');
|
|
25
|
+
require('react-international-phone');
|
|
26
26
|
var getVerifyArgs = require('../../functions/getVerifyArgs/getVerifyArgs.cjs');
|
|
27
27
|
var updatePrimaryWalletId = require('../../functions/updatePrimaryWalletId/updatePrimaryWalletId.cjs');
|
|
28
28
|
require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
@@ -8,17 +8,17 @@ import '@dynamic-labs/sdk-api-core';
|
|
|
8
8
|
import '../../../client/client.js';
|
|
9
9
|
import '@dynamic-labs-sdk/client';
|
|
10
10
|
import '../../../config/ApiEndpoint.js';
|
|
11
|
-
import '../../constants/values.js';
|
|
12
|
-
import { USER_NOT_LOGGED_IN } from '../../constants/errors.js';
|
|
13
|
-
import '@dynamic-labs/multi-wallet';
|
|
14
|
-
import 'react-international-phone';
|
|
15
|
-
import '../../constants/colors.js';
|
|
16
11
|
import '@dynamic-labs/iconic';
|
|
17
12
|
import 'react/jsx-runtime';
|
|
18
13
|
import '../../../context/ViewContext/ViewContext.js';
|
|
19
14
|
import { logger } from '../../../shared/logger.js';
|
|
20
15
|
import '@dynamic-labs/wallet-book';
|
|
16
|
+
import '../../constants/colors.js';
|
|
17
|
+
import '../../constants/values.js';
|
|
21
18
|
import '../../../shared/consts/index.js';
|
|
19
|
+
import { USER_NOT_LOGGED_IN } from '../../constants/errors.js';
|
|
20
|
+
import '@dynamic-labs/multi-wallet';
|
|
21
|
+
import 'react-international-phone';
|
|
22
22
|
import { getVerifyArgs } from '../../functions/getVerifyArgs/getVerifyArgs.js';
|
|
23
23
|
import { updatePrimaryWalletId } from '../../functions/updatePrimaryWalletId/updatePrimaryWalletId.js';
|
|
24
24
|
import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
@@ -11,19 +11,19 @@ require('@dynamic-labs-sdk/client/core');
|
|
|
11
11
|
require('../../../client/client.cjs');
|
|
12
12
|
require('@dynamic-labs-sdk/client');
|
|
13
13
|
require('../../../config/ApiEndpoint.cjs');
|
|
14
|
-
var findEmbeddedWalletFromVerifiedCredentials = require('../../functions/findEmbeddedWalletFromVerifiedCredentials/findEmbeddedWalletFromVerifiedCredentials.cjs');
|
|
15
|
-
require('../../constants/values.cjs');
|
|
16
|
-
var errors = require('../../constants/errors.cjs');
|
|
17
|
-
require('@dynamic-labs/multi-wallet');
|
|
18
|
-
require('react-international-phone');
|
|
19
|
-
require('../../constants/colors.cjs');
|
|
20
14
|
require('@dynamic-labs/iconic');
|
|
21
15
|
require('@dynamic-labs/wallet-connector-core');
|
|
22
16
|
require('react/jsx-runtime');
|
|
23
17
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
24
18
|
require('../../../shared/logger.cjs');
|
|
25
19
|
require('@dynamic-labs/wallet-book');
|
|
20
|
+
require('../../constants/colors.cjs');
|
|
21
|
+
require('../../constants/values.cjs');
|
|
26
22
|
require('../../../shared/consts/index.cjs');
|
|
23
|
+
var findEmbeddedWalletFromVerifiedCredentials = require('../../functions/findEmbeddedWalletFromVerifiedCredentials/findEmbeddedWalletFromVerifiedCredentials.cjs');
|
|
24
|
+
var errors = require('../../constants/errors.cjs');
|
|
25
|
+
require('@dynamic-labs/multi-wallet');
|
|
26
|
+
require('react-international-phone');
|
|
27
27
|
require('../../../store/state/nonce/nonce.cjs');
|
|
28
28
|
var updatePrimaryWalletId = require('../../functions/updatePrimaryWalletId/updatePrimaryWalletId.cjs');
|
|
29
29
|
require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
@@ -7,19 +7,19 @@ import '@dynamic-labs-sdk/client/core';
|
|
|
7
7
|
import '../../../client/client.js';
|
|
8
8
|
import '@dynamic-labs-sdk/client';
|
|
9
9
|
import '../../../config/ApiEndpoint.js';
|
|
10
|
-
import { findEmbeddedWalletFromVerifiedCredentials } from '../../functions/findEmbeddedWalletFromVerifiedCredentials/findEmbeddedWalletFromVerifiedCredentials.js';
|
|
11
|
-
import '../../constants/values.js';
|
|
12
|
-
import { USER_NOT_LOGGED_IN, USER_HAS_V2_EMBEDDED_WALLET, INCOMPATIBLE_SDK_VERSION } from '../../constants/errors.js';
|
|
13
|
-
import '@dynamic-labs/multi-wallet';
|
|
14
|
-
import 'react-international-phone';
|
|
15
|
-
import '../../constants/colors.js';
|
|
16
10
|
import '@dynamic-labs/iconic';
|
|
17
11
|
import '@dynamic-labs/wallet-connector-core';
|
|
18
12
|
import 'react/jsx-runtime';
|
|
19
13
|
import '../../../context/ViewContext/ViewContext.js';
|
|
20
14
|
import '../../../shared/logger.js';
|
|
21
15
|
import '@dynamic-labs/wallet-book';
|
|
16
|
+
import '../../constants/colors.js';
|
|
17
|
+
import '../../constants/values.js';
|
|
22
18
|
import '../../../shared/consts/index.js';
|
|
19
|
+
import { findEmbeddedWalletFromVerifiedCredentials } from '../../functions/findEmbeddedWalletFromVerifiedCredentials/findEmbeddedWalletFromVerifiedCredentials.js';
|
|
20
|
+
import { USER_NOT_LOGGED_IN, USER_HAS_V2_EMBEDDED_WALLET, INCOMPATIBLE_SDK_VERSION } from '../../constants/errors.js';
|
|
21
|
+
import '@dynamic-labs/multi-wallet';
|
|
22
|
+
import 'react-international-phone';
|
|
23
23
|
import '../../../store/state/nonce/nonce.js';
|
|
24
24
|
import { updatePrimaryWalletId } from '../../functions/updatePrimaryWalletId/updatePrimaryWalletId.js';
|
|
25
25
|
import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
@@ -11,18 +11,18 @@ var utils = require('@dynamic-labs/utils');
|
|
|
11
11
|
require('@dynamic-labs-sdk/client/core');
|
|
12
12
|
require('../../../client/client.cjs');
|
|
13
13
|
require('../../../config/ApiEndpoint.cjs');
|
|
14
|
-
require('../../constants/values.cjs');
|
|
15
|
-
require('@dynamic-labs/multi-wallet');
|
|
16
|
-
require('react-international-phone');
|
|
17
|
-
require('../../constants/colors.cjs');
|
|
18
14
|
require('@dynamic-labs/iconic');
|
|
19
15
|
require('@dynamic-labs/wallet-connector-core');
|
|
20
16
|
require('react/jsx-runtime');
|
|
21
17
|
var ViewContext = require('../../../context/ViewContext/ViewContext.cjs');
|
|
22
18
|
var logger = require('../../../shared/logger.cjs');
|
|
23
19
|
require('@dynamic-labs/wallet-book');
|
|
20
|
+
require('../../constants/colors.cjs');
|
|
21
|
+
require('../../constants/values.cjs');
|
|
24
22
|
var hasPendingMfaAction = require('../../../shared/utils/functions/hasPendingMfaAction/hasPendingMfaAction.cjs');
|
|
25
23
|
require('../../../shared/consts/index.cjs');
|
|
24
|
+
require('@dynamic-labs/multi-wallet');
|
|
25
|
+
require('react-international-phone');
|
|
26
26
|
require('../../../store/state/nonce/nonce.cjs');
|
|
27
27
|
require('@dynamic-labs/locale');
|
|
28
28
|
require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|