@dynamic-labs/sdk-react-core 3.0.0-alpha.41 → 3.0.0-alpha.43
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 +30 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +13 -13
- package/src/index.cjs +2 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +2 -2
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +2 -2
- package/src/lib/components/MfaDeviceTileSkeleton/MfaDeviceTileSkeleton.cjs +11 -0
- package/src/lib/components/MfaDeviceTileSkeleton/MfaDeviceTileSkeleton.d.ts +2 -0
- package/src/lib/components/MfaDeviceTileSkeleton/MfaDeviceTileSkeleton.js +7 -0
- package/src/lib/components/MfaDeviceTileSkeleton/index.d.ts +1 -0
- package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +2 -1
- package/src/lib/components/NeedHelpSection/NeedHelpSection.js +2 -1
- package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.cjs +2 -1
- package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.js +2 -1
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +0 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +0 -1
- package/src/lib/context/DynamicContext/DynamicContext.cjs +1 -2
- package/src/lib/context/DynamicContext/DynamicContext.js +1 -2
- package/src/lib/context/DynamicContext/types/IDynamicContext.d.ts +0 -1
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +2 -1
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +2 -1
- package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.cjs +1 -2
- package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.d.ts +1 -1
- package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.js +1 -2
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +0 -6
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +0 -6
- package/src/lib/locale/en/translation.cjs +2 -2
- package/src/lib/locale/en/translation.d.ts +1 -1
- package/src/lib/locale/en/translation.js +2 -2
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +5 -4
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +5 -4
- package/src/lib/shared/assets/profile-outline.cjs +5 -5
- package/src/lib/shared/assets/profile-outline.js +5 -5
- package/src/lib/shared/assets/settings-outline.cjs +5 -5
- package/src/lib/shared/assets/settings-outline.js +5 -5
- package/src/lib/shared/assets/wallet-outline-v2.cjs +5 -5
- package/src/lib/shared/assets/wallet-outline-v2.js +5 -5
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/createUserProfile/createUserProfile.cjs +1 -4
- package/src/lib/utils/functions/createUserProfile/createUserProfile.js +1 -4
- package/src/lib/utils/functions/index.d.ts +1 -0
- package/src/lib/utils/functions/isAuthenticatedWithAWallet/index.d.ts +1 -0
- package/src/lib/utils/functions/isAuthenticatedWithAWallet/isAuthenticatedWithAWallet.cjs +14 -0
- package/src/lib/utils/functions/isAuthenticatedWithAWallet/isAuthenticatedWithAWallet.d.ts +2 -0
- package/src/lib/utils/functions/isAuthenticatedWithAWallet/isAuthenticatedWithAWallet.js +10 -0
- package/src/lib/utils/functions/isMultiAssetSupportedNetwork/isMultiAssetSupportedNetwork.d.ts +1 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.cjs +5 -4
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.js +5 -4
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.cjs +2 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.js +2 -1
- package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.cjs +2 -1
- package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.js +2 -1
- package/src/lib/utils/hooks/useTransferWallet/index.d.ts +1 -0
- package/src/lib/views/EmailVerification/EmailVerification.cjs +2 -1
- package/src/lib/views/EmailVerification/EmailVerification.js +2 -1
- package/src/lib/views/LoginView/LoginViewSection/LoginViewSection.cjs +20 -16
- package/src/lib/views/LoginView/LoginViewSection/LoginViewSection.js +20 -16
- package/src/lib/views/LoginView/sections/ToggleableSection/ToggleableSection.d.ts +1 -2
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.d.ts +9 -0
- package/src/lib/views/viewToComponentMap.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +3 -2
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +3 -2
- package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.cjs +85 -1
- package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.d.ts +0 -1
- package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.js +85 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.cjs +7 -4
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.d.ts +0 -2
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.js +8 -4
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/UserDeviceTile.cjs +4 -3
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/UserDeviceTile.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/UserDeviceTile.js +4 -3
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/utils/sort.cjs +23 -0
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/utils/sort.d.ts +4 -0
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/utils/sort.js +17 -0
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +1 -2
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +1 -2
- package/src/lib/shared/assets/profile.cjs +0 -65
- package/src/lib/shared/assets/profile.js +0 -41
- package/src/lib/shared/assets/settings.cjs +0 -54
- package/src/lib/shared/assets/settings.js +0 -30
- package/src/lib/shared/assets/wallet.cjs +0 -52
- package/src/lib/shared/assets/wallet.js +0 -28
|
@@ -3,11 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var index = require('../../../shared/utils/functions/lastAuthenticatedAccount/index.cjs');
|
|
7
|
-
|
|
8
6
|
const createUserProfileFromSdkUser = (user) => {
|
|
9
7
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
10
|
-
const wallet = index.lastAuthenticatedAccount(user);
|
|
11
8
|
const kyc = {
|
|
12
9
|
alias: (_a = user.alias) !== null && _a !== void 0 ? _a : undefined,
|
|
13
10
|
btcWallet: (_b = user.btcWallet) !== null && _b !== void 0 ? _b : undefined,
|
|
@@ -30,7 +27,7 @@ const createUserProfileFromSdkUser = (user) => {
|
|
|
30
27
|
team: (_u = user.team) !== null && _u !== void 0 ? _u : undefined,
|
|
31
28
|
username: (_v = user.username) !== null && _v !== void 0 ? _v : undefined,
|
|
32
29
|
};
|
|
33
|
-
const userProfile = Object.assign({
|
|
30
|
+
const userProfile = Object.assign({ environmentId: user.projectEnvironmentId, lastVerifiedCredentialId: (_w = user.lastVerifiedCredentialId) !== null && _w !== void 0 ? _w : undefined, lists: user.lists, metadata: user.metadata, mfaBackupCodeAcknowledgement: user.mfaBackupCodeAcknowledgement, missingFields: user.missingFields, newUser: user.newUser, scope: user.scope, sessionId: (_x = user.sessionId) !== null && _x !== void 0 ? _x : 'missing-sessionId', userId: user.id, verifiedCredentials: user.verifiedCredentials || [] }, kyc);
|
|
34
31
|
return userProfile;
|
|
35
32
|
};
|
|
36
33
|
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import { lastAuthenticatedAccount } from '../../../shared/utils/functions/lastAuthenticatedAccount/index.js';
|
|
3
|
-
|
|
4
2
|
const createUserProfileFromSdkUser = (user) => {
|
|
5
3
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
6
|
-
const wallet = lastAuthenticatedAccount(user);
|
|
7
4
|
const kyc = {
|
|
8
5
|
alias: (_a = user.alias) !== null && _a !== void 0 ? _a : undefined,
|
|
9
6
|
btcWallet: (_b = user.btcWallet) !== null && _b !== void 0 ? _b : undefined,
|
|
@@ -26,7 +23,7 @@ const createUserProfileFromSdkUser = (user) => {
|
|
|
26
23
|
team: (_u = user.team) !== null && _u !== void 0 ? _u : undefined,
|
|
27
24
|
username: (_v = user.username) !== null && _v !== void 0 ? _v : undefined,
|
|
28
25
|
};
|
|
29
|
-
const userProfile = Object.assign({
|
|
26
|
+
const userProfile = Object.assign({ environmentId: user.projectEnvironmentId, lastVerifiedCredentialId: (_w = user.lastVerifiedCredentialId) !== null && _w !== void 0 ? _w : undefined, lists: user.lists, metadata: user.metadata, mfaBackupCodeAcknowledgement: user.mfaBackupCodeAcknowledgement, missingFields: user.missingFields, newUser: user.newUser, scope: user.scope, sessionId: (_x = user.sessionId) !== null && _x !== void 0 ? _x : 'missing-sessionId', userId: user.id, verifiedCredentials: user.verifiedCredentials || [] }, kyc);
|
|
30
27
|
return userProfile;
|
|
31
28
|
};
|
|
32
29
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { isAuthenticatedWithAWallet } from './isAuthenticatedWithAWallet';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var sdkApiCore = require('@dynamic-labs/sdk-api-core');
|
|
7
|
+
|
|
8
|
+
const isAuthenticatedWithAWallet = (user) => {
|
|
9
|
+
const lastVerifiedCredential = user.verifiedCredentials.find((vc) => vc.id === user.lastVerifiedCredentialId);
|
|
10
|
+
return ((lastVerifiedCredential === null || lastVerifiedCredential === void 0 ? void 0 : lastVerifiedCredential.format) ===
|
|
11
|
+
sdkApiCore.JwtVerifiedCredentialFormatEnum.Blockchain);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.isAuthenticatedWithAWallet = isAuthenticatedWithAWallet;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { JwtVerifiedCredentialFormatEnum } from '@dynamic-labs/sdk-api-core';
|
|
3
|
+
|
|
4
|
+
const isAuthenticatedWithAWallet = (user) => {
|
|
5
|
+
const lastVerifiedCredential = user.verifiedCredentials.find((vc) => vc.id === user.lastVerifiedCredentialId);
|
|
6
|
+
return ((lastVerifiedCredential === null || lastVerifiedCredential === void 0 ? void 0 : lastVerifiedCredential.format) ===
|
|
7
|
+
JwtVerifiedCredentialFormatEnum.Blockchain);
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { isAuthenticatedWithAWallet };
|
package/src/lib/utils/functions/isMultiAssetSupportedNetwork/isMultiAssetSupportedNetwork.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { WalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
2
|
-
export declare const isMultiAssetSupportedNetwork: (walletConnector: WalletConnector |
|
|
2
|
+
export declare const isMultiAssetSupportedNetwork: (walletConnector: WalletConnector | undefined, network: string | number | undefined) => boolean;
|
|
@@ -126,12 +126,13 @@ var useInternalDynamicContext = require('../../../../context/DynamicContext/useD
|
|
|
126
126
|
*/
|
|
127
127
|
const useSecureEnclaveEmbeddedWallet = () => {
|
|
128
128
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
129
|
-
const { projectSettings, primaryWallet, user: user$1, environmentId, walletConnectorOptions,
|
|
129
|
+
const { projectSettings, primaryWallet, user: user$1, environmentId, walletConnectorOptions, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
130
130
|
const { createTurnkeyWallet } = useTurnkey.useTurnkey();
|
|
131
131
|
const { hasRecoveryEmail } = useIsTurnkeyWallet.useIsTurnkeyWallet();
|
|
132
132
|
const { createRootElement } = useElementById.useElementById();
|
|
133
133
|
const { isLoadingEmbeddedWallet, setIsLoadingEmbeddedWallet } = WalletContext.useWalletContext();
|
|
134
134
|
const wallet = getEOAWallet.getEOAWallet(primaryWallet, (user$1 === null || user$1 === void 0 ? void 0 : user$1.verifiedCredentials) || []);
|
|
135
|
+
const primaryConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
|
|
135
136
|
const userHasEmbeddedWallet = React.useCallback(() => hasEmbeddedWallet.hasEmbeddedWallet(user$1, 'turnkey'), [user$1]);
|
|
136
137
|
const getWalletVersion = () => {
|
|
137
138
|
if (walletConnectorCore.isSessionKeyCompatibleWalletConnector(wallet === null || wallet === void 0 ? void 0 : wallet.connector)) {
|
|
@@ -347,9 +348,9 @@ const useSecureEnclaveEmbeddedWallet = () => {
|
|
|
347
348
|
const isSessionKeySessionAAActive = ((_e = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _e === void 0 ? void 0 : _e.key) === 'zerodev' &&
|
|
348
349
|
walletConnectorCore.isSessionKeyCompatibleWalletConnector((wallet === null || wallet === void 0 ? void 0 : wallet.connector).getEOAConnector()) &&
|
|
349
350
|
((_h = (_g = (_f = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _f === void 0 ? void 0 : _f.getEOAConnector()) === null || _g === void 0 ? void 0 : _g.sessionKeys) === null || _h === void 0 ? void 0 : _h.publicKey);
|
|
350
|
-
const isSessionKeySessionActive = (_k = Boolean(
|
|
351
|
-
walletConnectorCore.isSessionKeyCompatibleWalletConnector(
|
|
352
|
-
((_j =
|
|
351
|
+
const isSessionKeySessionActive = (_k = Boolean(primaryConnector &&
|
|
352
|
+
walletConnectorCore.isSessionKeyCompatibleWalletConnector(primaryConnector) &&
|
|
353
|
+
((_j = primaryConnector.sessionKeys) === null || _j === void 0 ? void 0 : _j.publicKey))) !== null && _k !== void 0 ? _k : false;
|
|
353
354
|
/**
|
|
354
355
|
* Checks if the embedded wallet session is active
|
|
355
356
|
* @returns boolean
|
|
@@ -122,12 +122,13 @@ import { useInternalDynamicContext } from '../../../../context/DynamicContext/us
|
|
|
122
122
|
*/
|
|
123
123
|
const useSecureEnclaveEmbeddedWallet = () => {
|
|
124
124
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
125
|
-
const { projectSettings, primaryWallet, user, environmentId, walletConnectorOptions,
|
|
125
|
+
const { projectSettings, primaryWallet, user, environmentId, walletConnectorOptions, } = useInternalDynamicContext();
|
|
126
126
|
const { createTurnkeyWallet } = useTurnkey();
|
|
127
127
|
const { hasRecoveryEmail } = useIsTurnkeyWallet();
|
|
128
128
|
const { createRootElement } = useElementById();
|
|
129
129
|
const { isLoadingEmbeddedWallet, setIsLoadingEmbeddedWallet } = useWalletContext();
|
|
130
130
|
const wallet = getEOAWallet(primaryWallet, (user === null || user === void 0 ? void 0 : user.verifiedCredentials) || []);
|
|
131
|
+
const primaryConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
|
|
131
132
|
const userHasEmbeddedWallet = useCallback(() => hasEmbeddedWallet(user, 'turnkey'), [user]);
|
|
132
133
|
const getWalletVersion = () => {
|
|
133
134
|
if (isSessionKeyCompatibleWalletConnector(wallet === null || wallet === void 0 ? void 0 : wallet.connector)) {
|
|
@@ -343,9 +344,9 @@ const useSecureEnclaveEmbeddedWallet = () => {
|
|
|
343
344
|
const isSessionKeySessionAAActive = ((_e = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _e === void 0 ? void 0 : _e.key) === 'zerodev' &&
|
|
344
345
|
isSessionKeyCompatibleWalletConnector((wallet === null || wallet === void 0 ? void 0 : wallet.connector).getEOAConnector()) &&
|
|
345
346
|
((_h = (_g = (_f = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _f === void 0 ? void 0 : _f.getEOAConnector()) === null || _g === void 0 ? void 0 : _g.sessionKeys) === null || _h === void 0 ? void 0 : _h.publicKey);
|
|
346
|
-
const isSessionKeySessionActive = (_k = Boolean(
|
|
347
|
-
isSessionKeyCompatibleWalletConnector(
|
|
348
|
-
((_j =
|
|
347
|
+
const isSessionKeySessionActive = (_k = Boolean(primaryConnector &&
|
|
348
|
+
isSessionKeyCompatibleWalletConnector(primaryConnector) &&
|
|
349
|
+
((_j = primaryConnector.sessionKeys) === null || _j === void 0 ? void 0 : _j.publicKey))) !== null && _k !== void 0 ? _k : false;
|
|
349
350
|
/**
|
|
350
351
|
* Checks if the embedded wallet session is active
|
|
351
352
|
* @returns boolean
|
|
@@ -100,8 +100,9 @@ var useInternalDynamicContext = require('../../../../../context/DynamicContext/u
|
|
|
100
100
|
|
|
101
101
|
// Hook exposed to customers and used internally to trigger embedded wallet creation
|
|
102
102
|
const useTurnkey = () => {
|
|
103
|
-
const { projectSettings, setPrimaryWalletId, walletConnectorOptions,
|
|
103
|
+
const { projectSettings, setPrimaryWalletId, walletConnectorOptions, setShowAuthFlow, environmentId, user, primaryWallet, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
104
104
|
const { setView } = ViewContext.useViewContext();
|
|
105
|
+
const walletConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
|
|
105
106
|
const { createDynamicEmbeddedWalletMutation } = useCreateDynamicEmbeddedWalletMutation.useCreateDynamicEmbeddedWalletMutation();
|
|
106
107
|
const startHeadlessEmbeddedWalletCreationFlow = React.useCallback((chains, options) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
107
108
|
yield createDynamicEmbeddedWalletMutation({
|
|
@@ -96,8 +96,9 @@ import { useInternalDynamicContext } from '../../../../../context/DynamicContext
|
|
|
96
96
|
|
|
97
97
|
// Hook exposed to customers and used internally to trigger embedded wallet creation
|
|
98
98
|
const useTurnkey = () => {
|
|
99
|
-
const { projectSettings, setPrimaryWalletId, walletConnectorOptions,
|
|
99
|
+
const { projectSettings, setPrimaryWalletId, walletConnectorOptions, setShowAuthFlow, environmentId, user, primaryWallet, } = useInternalDynamicContext();
|
|
100
100
|
const { setView } = useViewContext();
|
|
101
|
+
const walletConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
|
|
101
102
|
const { createDynamicEmbeddedWalletMutation } = useCreateDynamicEmbeddedWalletMutation();
|
|
102
103
|
const startHeadlessEmbeddedWalletCreationFlow = useCallback((chains, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
103
104
|
yield createDynamicEmbeddedWalletMutation({
|
|
@@ -96,7 +96,8 @@ const useTokenBalances = ({ accountAddress, networkId, chainName = sdkApiCore.Ch
|
|
|
96
96
|
const [tokenBalancesData, setTokenBalancesData] = React.useState(undefined);
|
|
97
97
|
const [isLoading, setIsLoading] = React.useState(false);
|
|
98
98
|
const [error, setError] = React.useState(undefined);
|
|
99
|
-
const { primaryWallet, environmentId, network,
|
|
99
|
+
const { primaryWallet, environmentId, network, user } = useInternalDynamicContext.useInternalDynamicContext();
|
|
100
|
+
const walletConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
|
|
100
101
|
const requestChainName = chainName !== null && chainName !== void 0 ? chainName : walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.connectedChain;
|
|
101
102
|
const requestAccount = accountAddress !== null && accountAddress !== void 0 ? accountAddress : primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.address;
|
|
102
103
|
const requestNetwork = networkId !== null && networkId !== void 0 ? networkId : network;
|
|
@@ -92,7 +92,8 @@ const useTokenBalances = ({ accountAddress, networkId, chainName = ChainEnum.Evm
|
|
|
92
92
|
const [tokenBalancesData, setTokenBalancesData] = useState(undefined);
|
|
93
93
|
const [isLoading, setIsLoading] = useState(false);
|
|
94
94
|
const [error, setError] = useState(undefined);
|
|
95
|
-
const { primaryWallet, environmentId, network,
|
|
95
|
+
const { primaryWallet, environmentId, network, user } = useInternalDynamicContext();
|
|
96
|
+
const walletConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
|
|
96
97
|
const requestChainName = chainName !== null && chainName !== void 0 ? chainName : walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.connectedChain;
|
|
97
98
|
const requestAccount = accountAddress !== null && accountAddress !== void 0 ? accountAddress : primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.address;
|
|
98
99
|
const requestNetwork = networkId !== null && networkId !== void 0 ? networkId : network;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useTransferWallet';
|
|
@@ -114,10 +114,11 @@ require('qrcode');
|
|
|
114
114
|
const SECONDS_TO_RETRY = 15;
|
|
115
115
|
const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _showRetryButton = true, showTransferMessage: _showTransferMessage = false, }) => {
|
|
116
116
|
var _a, _b, _c, _d;
|
|
117
|
-
const { environmentId, handleLogOut, setPrimaryWalletId, setShowAuthFlow, projectSettings, user, userWithMissingInfo, walletConnectorOptions,
|
|
117
|
+
const { environmentId, handleLogOut, setPrimaryWalletId, setShowAuthFlow, projectSettings, user, userWithMissingInfo, walletConnectorOptions, primaryWallet, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
118
118
|
const { setView, goToInitialView } = ViewContext.useViewContext();
|
|
119
119
|
const { error, setError, setErrorMessage } = ErrorContext.useErrorContext();
|
|
120
120
|
const { loading, setLoading } = LoadingContext.useLoadingContext();
|
|
121
|
+
const walletConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
|
|
121
122
|
const [showRetryButton, setShowRetryButton] = React.useState(_showRetryButton);
|
|
122
123
|
const [showTransferMessage, setShowTransferMessage] = React.useState(_showTransferMessage);
|
|
123
124
|
// Use a state to ensure UI is updated, but also a ref to access in effect cleanup
|
|
@@ -110,10 +110,11 @@ import 'qrcode';
|
|
|
110
110
|
const SECONDS_TO_RETRY = 15;
|
|
111
111
|
const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _showRetryButton = true, showTransferMessage: _showTransferMessage = false, }) => {
|
|
112
112
|
var _a, _b, _c, _d;
|
|
113
|
-
const { environmentId, handleLogOut, setPrimaryWalletId, setShowAuthFlow, projectSettings, user, userWithMissingInfo, walletConnectorOptions,
|
|
113
|
+
const { environmentId, handleLogOut, setPrimaryWalletId, setShowAuthFlow, projectSettings, user, userWithMissingInfo, walletConnectorOptions, primaryWallet, } = useInternalDynamicContext();
|
|
114
114
|
const { setView, goToInitialView } = useViewContext();
|
|
115
115
|
const { error, setError, setErrorMessage } = useErrorContext();
|
|
116
116
|
const { loading, setLoading } = useLoadingContext();
|
|
117
|
+
const walletConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
|
|
117
118
|
const [showRetryButton, setShowRetryButton] = useState(_showRetryButton);
|
|
118
119
|
const [showTransferMessage, setShowTransferMessage] = useState(_showTransferMessage);
|
|
119
120
|
// Use a state to ensure UI is updated, but also a ref to access in effect cleanup
|
|
@@ -108,22 +108,26 @@ const LoginViewSection = ({ viewSection, index, walletCount, gotToWalletList, })
|
|
|
108
108
|
case sdkApiCore.SdkViewSectionType.Phone:
|
|
109
109
|
return (jsxRuntime.jsx(PhoneNumberSignInSection.PhoneNumberSignInSection, { onSubmit: () => setIsLoading(true), onSubmitError: () => setIsLoading(false), isLoading: isLoading }));
|
|
110
110
|
case sdkApiCore.SdkViewSectionType.EmailAndPhone:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
111
|
+
// eslint-disable-next-line no-case-declarations
|
|
112
|
+
const sections = [
|
|
113
|
+
{
|
|
114
|
+
button: t('dyn_login.email_or_phone.use_phone'),
|
|
115
|
+
buttonCopyKey: 'dyn_login.email_or_phone.use_phone',
|
|
116
|
+
component: (jsxRuntime.jsx(LoginEmailForm.LoginEmailForm, { onSubmit: () => setIsLoading(true), onSubmitError: () => setIsLoading(false), isLoading: isLoading })),
|
|
117
|
+
label: t('dyn_login.email_or_phone.prefer_phone'),
|
|
118
|
+
labelCopyKey: 'dyn_login.email_or_phone.prefer_phone',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
button: t('dyn_login.email_or_phone.use_email'),
|
|
122
|
+
buttonCopyKey: 'dyn_login.email_or_phone.use_email',
|
|
123
|
+
component: (jsxRuntime.jsx(PhoneNumberSignInSection.PhoneNumberSignInSection, { onSubmit: () => setIsLoading(true), onSubmitError: () => setIsLoading(false), isLoading: isLoading })),
|
|
124
|
+
label: t('dyn_login.email_or_phone.prefer_email'),
|
|
125
|
+
labelCopyKey: 'dyn_login.email_or_phone.prefer_email',
|
|
126
|
+
},
|
|
127
|
+
];
|
|
128
|
+
if (viewSection.defaultItem === 'phone')
|
|
129
|
+
sections.reverse();
|
|
130
|
+
return jsxRuntime.jsx(ToggleableSection.ToggleableSection, { sections: sections });
|
|
127
131
|
case sdkApiCore.SdkViewSectionType.Wallet:
|
|
128
132
|
return (jsxRuntime.jsx(WalletSignInSection.WalletSignInSection, { numberOfItensToShow: viewSection.numOfItemsToDisplay || 0, onSubmit: () => {
|
|
129
133
|
// this view is just to show the back button
|
|
@@ -104,22 +104,26 @@ const LoginViewSection = ({ viewSection, index, walletCount, gotToWalletList, })
|
|
|
104
104
|
case SdkViewSectionType.Phone:
|
|
105
105
|
return (jsx(PhoneNumberSignInSection, { onSubmit: () => setIsLoading(true), onSubmitError: () => setIsLoading(false), isLoading: isLoading }));
|
|
106
106
|
case SdkViewSectionType.EmailAndPhone:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
107
|
+
// eslint-disable-next-line no-case-declarations
|
|
108
|
+
const sections = [
|
|
109
|
+
{
|
|
110
|
+
button: t('dyn_login.email_or_phone.use_phone'),
|
|
111
|
+
buttonCopyKey: 'dyn_login.email_or_phone.use_phone',
|
|
112
|
+
component: (jsx(LoginEmailForm, { onSubmit: () => setIsLoading(true), onSubmitError: () => setIsLoading(false), isLoading: isLoading })),
|
|
113
|
+
label: t('dyn_login.email_or_phone.prefer_phone'),
|
|
114
|
+
labelCopyKey: 'dyn_login.email_or_phone.prefer_phone',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
button: t('dyn_login.email_or_phone.use_email'),
|
|
118
|
+
buttonCopyKey: 'dyn_login.email_or_phone.use_email',
|
|
119
|
+
component: (jsx(PhoneNumberSignInSection, { onSubmit: () => setIsLoading(true), onSubmitError: () => setIsLoading(false), isLoading: isLoading })),
|
|
120
|
+
label: t('dyn_login.email_or_phone.prefer_email'),
|
|
121
|
+
labelCopyKey: 'dyn_login.email_or_phone.prefer_email',
|
|
122
|
+
},
|
|
123
|
+
];
|
|
124
|
+
if (viewSection.defaultItem === 'phone')
|
|
125
|
+
sections.reverse();
|
|
126
|
+
return jsx(ToggleableSection, { sections: sections });
|
|
123
127
|
case SdkViewSectionType.Wallet:
|
|
124
128
|
return (jsx(WalletSignInSection, { numberOfItensToShow: viewSection.numOfItemsToDisplay || 0, onSubmit: () => {
|
|
125
129
|
// this view is just to show the back button
|
|
@@ -6,8 +6,7 @@ export type Section = {
|
|
|
6
6
|
buttonCopyKey?: string;
|
|
7
7
|
labelCopyKey?: string;
|
|
8
8
|
};
|
|
9
|
-
type ToggleableSectionProps = {
|
|
9
|
+
export type ToggleableSectionProps = {
|
|
10
10
|
sections: [Section, Section];
|
|
11
11
|
};
|
|
12
12
|
export declare const ToggleableSection: FC<ToggleableSectionProps>;
|
|
13
|
-
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Icon } from '../../shared';
|
|
3
|
+
interface WalletHelpLinkProps {
|
|
4
|
+
Icon: Icon;
|
|
5
|
+
link: string;
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const WalletHelpLink: ({ name, link, Icon }: WalletHelpLinkProps) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -9,7 +9,7 @@ export declare const viewToComponentMap: {
|
|
|
9
9
|
'chainalysis-blocked-wallet': () => JSX.Element;
|
|
10
10
|
'collect-user-data': () => JSX.Element | null;
|
|
11
11
|
'collect-user-data-login-no-wallet': import("react").FC<{
|
|
12
|
-
userIdentification: keyof import("@dynamic-labs/sdk-api-core").UserFields | "
|
|
12
|
+
userIdentification: keyof import("@dynamic-labs/sdk-api-core").UserFields | "environmentId" | "lastVerifiedCredentialId" | "lists" | "newUser" | "sessionId" | "userId" | "verifiedCredentials" | "scope" | "missingFields";
|
|
13
13
|
userIdentificationOverride?: string | undefined;
|
|
14
14
|
}>;
|
|
15
15
|
'create-password-view': import("react").FC<import("./CreatePasswordView/CreatePasswordView").CreatePasswordViewProps>;
|
package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs
CHANGED
|
@@ -115,7 +115,7 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
115
115
|
const [balanceIsExpanded, setBalanceIsExpanded] = React.useState(false);
|
|
116
116
|
const [hasShadow, setHasShadow] = React.useState(false);
|
|
117
117
|
const contentRef = React.useRef(null);
|
|
118
|
-
const { primaryWallet, network, projectSettings, user,
|
|
118
|
+
const { primaryWallet, network, projectSettings, user, authMode, showFiat, multiAsset, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
119
119
|
const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
|
|
120
120
|
const { isTurnkeyWalletWithoutAuthenticator } = useIsTurnkeyWallet.useIsTurnkeyWallet();
|
|
121
121
|
const { isLoading: isLoadingTokenBalances, tokenBalances, error: errorTokenBalances, } = useTokenBalances.useTokenBalances({
|
|
@@ -123,6 +123,7 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
123
123
|
includeFiat: showFiat,
|
|
124
124
|
includeNativeBalance: true,
|
|
125
125
|
});
|
|
126
|
+
const primaryConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
|
|
126
127
|
const filteredTokenBalances = (tokenBalances === null || tokenBalances === void 0 ? void 0 : tokenBalances.filter((token) => token.name)) || [];
|
|
127
128
|
const address = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.address;
|
|
128
129
|
const nameService = useFetchNameService.useFetchNameService(address);
|
|
@@ -176,7 +177,7 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
176
177
|
}
|
|
177
178
|
};
|
|
178
179
|
const enableMultiAsset = authMode === 'connect-and-sign' && multiAsset;
|
|
179
|
-
const isNetworkMultiAssetSupported = isMultiAssetSupportedNetwork.isMultiAssetSupportedNetwork(
|
|
180
|
+
const isNetworkMultiAssetSupported = isMultiAssetSupportedNetwork.isMultiAssetSupportedNetwork(primaryConnector, network);
|
|
180
181
|
const isTooManyRequests = errorTokenBalances === 'Too many requests fetching balances';
|
|
181
182
|
const showMultiAsset = !isTooManyRequests && isNetworkMultiAssetSupported && enableMultiAsset;
|
|
182
183
|
filteredTokenBalances.sort((a, b) => ((b === null || b === void 0 ? void 0 : b.marketValue) || 0) - ((a === null || a === void 0 ? void 0 : a.marketValue) || 0));
|
package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js
CHANGED
|
@@ -111,7 +111,7 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
111
111
|
const [balanceIsExpanded, setBalanceIsExpanded] = useState(false);
|
|
112
112
|
const [hasShadow, setHasShadow] = useState(false);
|
|
113
113
|
const contentRef = useRef(null);
|
|
114
|
-
const { primaryWallet, network, projectSettings, user,
|
|
114
|
+
const { primaryWallet, network, projectSettings, user, authMode, showFiat, multiAsset, } = useInternalDynamicContext();
|
|
115
115
|
const { setDynamicWidgetView } = useWidgetContext();
|
|
116
116
|
const { isTurnkeyWalletWithoutAuthenticator } = useIsTurnkeyWallet();
|
|
117
117
|
const { isLoading: isLoadingTokenBalances, tokenBalances, error: errorTokenBalances, } = useTokenBalances({
|
|
@@ -119,6 +119,7 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
119
119
|
includeFiat: showFiat,
|
|
120
120
|
includeNativeBalance: true,
|
|
121
121
|
});
|
|
122
|
+
const primaryConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
|
|
122
123
|
const filteredTokenBalances = (tokenBalances === null || tokenBalances === void 0 ? void 0 : tokenBalances.filter((token) => token.name)) || [];
|
|
123
124
|
const address = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.address;
|
|
124
125
|
const nameService = useFetchNameService(address);
|
|
@@ -172,7 +173,7 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
172
173
|
}
|
|
173
174
|
};
|
|
174
175
|
const enableMultiAsset = authMode === 'connect-and-sign' && multiAsset;
|
|
175
|
-
const isNetworkMultiAssetSupported = isMultiAssetSupportedNetwork(
|
|
176
|
+
const isNetworkMultiAssetSupported = isMultiAssetSupportedNetwork(primaryConnector, network);
|
|
176
177
|
const isTooManyRequests = errorTokenBalances === 'Too many requests fetching balances';
|
|
177
178
|
const showMultiAsset = !isTooManyRequests && isNetworkMultiAssetSupported && enableMultiAsset;
|
|
178
179
|
filteredTokenBalances.sort((a, b) => ((b === null || b === void 0 ? void 0 : b.marketValue) || 0) - ((a === null || a === void 0 ? void 0 : a.marketValue) || 0));
|
|
@@ -5,12 +5,96 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var classNames = require('../../../../utils/functions/classNames/classNames.cjs');
|
|
8
|
+
require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
9
|
+
require('../../../../components/Alert/Alert.cjs');
|
|
10
|
+
require('react');
|
|
11
|
+
require('../../../../events/dynamicEvents.cjs');
|
|
12
|
+
require('../../../../../../_virtual/_tslib.cjs');
|
|
13
|
+
require('@dynamic-labs/utils');
|
|
14
|
+
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
15
|
+
require('@dynamic-labs/sdk-api-core');
|
|
16
|
+
require('../../../../shared/logger.cjs');
|
|
17
|
+
require('@dynamic-labs/iconic');
|
|
18
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
19
|
+
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
20
|
+
require('@dynamic-labs/wallet-book');
|
|
21
|
+
require('../../../../utils/constants/colors.cjs');
|
|
22
|
+
require('../../../../utils/constants/values.cjs');
|
|
23
|
+
require('../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
24
|
+
require('../../../../shared/utils/classes/storage/sessionStorage.cjs');
|
|
25
|
+
require('../../../../shared/consts/index.cjs');
|
|
26
|
+
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
27
|
+
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
28
|
+
require('@dynamic-labs/multi-wallet');
|
|
29
|
+
require('react-international-phone');
|
|
30
|
+
require('../../../../config/ApiEndpoint.cjs');
|
|
31
|
+
require('@dynamic-labs/store');
|
|
32
|
+
require('../../../../locale/locale.cjs');
|
|
33
|
+
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
34
|
+
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
35
|
+
require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
36
|
+
require('../../../../context/VerificationContext/VerificationContext.cjs');
|
|
37
|
+
require('react-dom');
|
|
38
|
+
require('../../../../context/WalletContext/WalletContext.cjs');
|
|
39
|
+
require('../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
|
|
40
|
+
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
41
|
+
require('../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
|
|
42
|
+
require('@dynamic-labs/types');
|
|
43
|
+
require('../../../../context/LoadingContext/LoadingContext.cjs');
|
|
44
|
+
require('yup');
|
|
45
|
+
require('../../../../context/MockContext/MockContext.cjs');
|
|
46
|
+
require('../../../../views/CollectUserDataView/useFields.cjs');
|
|
47
|
+
require('../../../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
48
|
+
require('../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
49
|
+
require('@dynamic-labs/rpc-providers');
|
|
50
|
+
require('react-i18next');
|
|
51
|
+
var Typography = require('../../../../components/Typography/Typography.cjs');
|
|
52
|
+
require('../../../../context/FooterAnimationContext/index.cjs');
|
|
53
|
+
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
54
|
+
require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
55
|
+
require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
56
|
+
require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
57
|
+
require('../../../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
58
|
+
require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
59
|
+
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
60
|
+
require('../DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
61
|
+
require('react-focus-lock');
|
|
62
|
+
require('../../context/DynamicWidgetContext.cjs');
|
|
63
|
+
require('../../../../components/IconButton/IconButton.cjs');
|
|
64
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
65
|
+
require('formik');
|
|
66
|
+
require('../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
67
|
+
require('../../../../components/Input/Input.cjs');
|
|
68
|
+
require('@dynamic-labs/viem-utils');
|
|
69
|
+
require('../../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
70
|
+
require('../../views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
71
|
+
require('../../../../../polyfills.cjs');
|
|
72
|
+
require('../../../../context/ErrorBoundary/ErrorBoundaryBase.cjs');
|
|
73
|
+
require('../../../../context/ErrorBoundary/ErrorBoundaryContext.cjs');
|
|
74
|
+
require('../../../DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.cjs');
|
|
75
|
+
require('../DynamicWidgetCard/DynamicWidgetCard.cjs');
|
|
76
|
+
require('../../../../components/IsBrowser/IsBrowser.cjs');
|
|
77
|
+
require('../../../../context/WidgetRegistry/WidgetRegistryContextProvider.cjs');
|
|
78
|
+
require('../../../../context/FundingContext/FundingContext.cjs');
|
|
79
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
80
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
81
|
+
require('../../../../views/WalletList/WalletList.cjs');
|
|
82
|
+
require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
83
|
+
require('@hcaptcha/react-hcaptcha');
|
|
84
|
+
require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
85
|
+
require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
86
|
+
require('../../../../context/SendBalanceContext/SendBalanceContext.cjs');
|
|
87
|
+
require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
88
|
+
require('../../../../context/ConnectWithOtpContext/constants.cjs');
|
|
89
|
+
require('../../../../context/ReinitializeContext/ReinitializeContextProvider.cjs');
|
|
90
|
+
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
91
|
+
require('qrcode');
|
|
8
92
|
|
|
9
93
|
const BottomNavBar = ({ value, onChange, options }) => {
|
|
10
94
|
const isActive = (_value) => _value === value;
|
|
11
95
|
return (jsxRuntime.jsx("div", { className: 'footer-options-switcher__container', "data-testid": 'OptionsSwitcher', children: options.map((option) => (jsxRuntime.jsxs("div", { className: classNames.classNames('footer-options-switcher__tab', {
|
|
12
96
|
'footer-options-switcher__tab--active': isActive(option.value),
|
|
13
|
-
}), onClick: () => onChange(option.value), children: [
|
|
97
|
+
}), onClick: () => onChange(option.value), children: [option.icon, jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', className: 'footer-options-switcher__label', children: option.label })] }, option.value))) }));
|
|
14
98
|
};
|
|
15
99
|
|
|
16
100
|
exports.BottomNavBar = BottomNavBar;
|