@dynamic-labs/sdk-react-core 1.1.0-alpha.8 → 1.1.0-alpha.9
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 +14 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -11
- package/src/index.cjs +2 -2
- package/src/index.js +1 -1
- package/src/lib/Main.cjs +4 -5
- package/src/lib/Main.js +4 -5
- package/src/lib/components/Toggle/Toggle.cjs +14 -0
- package/src/lib/components/Toggle/Toggle.d.ts +7 -0
- package/src/lib/components/Toggle/Toggle.js +10 -0
- package/src/lib/components/Toggle/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +35 -42
- package/src/lib/context/DynamicContext/DynamicContext.js +36 -43
- package/src/lib/context/DynamicContext/hooks/index.d.ts +1 -1
- package/src/lib/context/DynamicContext/hooks/useSetShowLinkNewWalletModal/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/hooks/{useSetShowLinkNewWalletModalWithInit/useSetShowLinkNewWalletModalWithInit.cjs → useSetShowLinkNewWalletModal/useSetShowLinkNewWalletModal.cjs} +11 -17
- package/src/lib/context/DynamicContext/hooks/{useSetShowLinkNewWalletModalWithInit/useSetShowLinkNewWalletModalWithInit.d.ts → useSetShowLinkNewWalletModal/useSetShowLinkNewWalletModal.d.ts} +3 -6
- package/src/lib/context/DynamicContext/hooks/{useSetShowLinkNewWalletModalWithInit/useSetShowLinkNewWalletModalWithInit.js → useSetShowLinkNewWalletModal/useSetShowLinkNewWalletModal.js} +11 -17
- package/src/lib/context/DynamicContext/hooks/useShowAuthFlow/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/hooks/useShowAuthFlow/useShowAuthFlow.cjs +59 -0
- package/src/lib/context/DynamicContext/hooks/useShowAuthFlow/useShowAuthFlow.d.ts +37 -0
- package/src/lib/context/DynamicContext/hooks/useShowAuthFlow/useShowAuthFlow.js +55 -0
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.cjs +1 -0
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.js +1 -0
- package/src/lib/context/DynamicContext/types/index.d.ts +10 -7
- package/src/lib/context/DynamicContext/useDynamicContext.cjs +6 -1
- package/src/lib/context/DynamicContext/useDynamicContext.d.ts +4 -1
- package/src/lib/context/DynamicContext/useDynamicContext.js +6 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +1 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +1 -1
- package/src/lib/events/dynamicEvents.d.ts +3 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +2 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +2 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +5 -5
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +5 -5
- package/src/lib/locale/en/translation.cjs +0 -2
- package/src/lib/locale/en/translation.d.ts +0 -2
- package/src/lib/locale/en/translation.js +0 -2
- package/src/lib/shared/types/index.d.ts +3 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.cjs +2 -4
- package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.js +2 -4
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.cjs +3 -3
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.js +4 -4
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +1 -1
- package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.cjs +3 -3
- package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.js +3 -3
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +1 -1
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +2 -2
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +1 -1
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +2 -2
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +2 -2
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs +6 -3
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js +6 -3
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +9 -6
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +9 -6
- package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.cjs +5 -3
- package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.js +5 -3
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +6 -8
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +6 -8
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +1 -1
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +1 -1
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +8 -5
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +8 -5
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +2 -2
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +2 -2
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +2 -2
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +2 -2
- package/src/lib/utils/hooks/useWalletConnectors/utils/findWallet/findWallet.cjs +5 -2
- package/src/lib/utils/hooks/useWalletConnectors/utils/findWallet/findWallet.js +5 -2
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +1 -1
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +1 -1
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +1 -1
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +1 -1
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +1 -1
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +1 -1
- package/src/lib/views/EmailVerification/EmailVerification.cjs +1 -1
- package/src/lib/views/EmailVerification/EmailVerification.js +1 -1
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +1 -1
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +1 -1
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +1 -1
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +1 -1
- package/src/lib/views/QrCodeView/QRCode.cjs +2 -3
- package/src/lib/views/QrCodeView/QRCode.js +2 -3
- package/src/lib/views/WalletGroupView/WalletGroupView.cjs +3 -1
- package/src/lib/views/WalletGroupView/WalletGroupView.js +3 -1
- package/src/lib/views/WalletGroupView/components/HardwareWalletToggle/HardwareWalletToggle.cjs +8 -6
- package/src/lib/views/WalletGroupView/components/HardwareWalletToggle/HardwareWalletToggle.js +9 -7
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +5 -5
- package/src/lib/views/WalletUsedView/WalletUsedView.js +5 -5
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.cjs +6 -3
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.js +6 -3
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +2 -3
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +2 -3
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +66 -21
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +67 -22
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +2 -2
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +7 -3
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +7 -3
- package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/index.d.ts +0 -1
- package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.cjs +0 -55
- package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.d.ts +0 -18
- package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.js +0 -51
- package/src/lib/context/DynamicContext/hooks/useSetShowLinkNewWalletModalWithInit/index.d.ts +0 -1
|
@@ -28,7 +28,7 @@ const BridgeNextWalletConnectionView = () => {
|
|
|
28
28
|
if (!chainInfo) {
|
|
29
29
|
throw new DynamicError('No chain info found for chain', chain);
|
|
30
30
|
}
|
|
31
|
-
return (jsx(BridgeNextWalletToConnectLayout, { chainName: chainInfo.blockchainName, chainIcon: jsx(ChainIcon, {}), onClickAction: () => setView('wallet-list'), onClickClose: () => setShowAuthFlow(false) }));
|
|
31
|
+
return (jsx(BridgeNextWalletToConnectLayout, { chainName: chainInfo.blockchainName, chainIcon: jsx(ChainIcon, {}), onClickAction: () => setView('wallet-list'), onClickClose: () => setShowAuthFlow(false, { emitCancelAuth: true }) }));
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export { BridgeNextWalletConnectionView };
|
|
@@ -27,7 +27,7 @@ var Balance = require('../../widgets/DynamicWidget/components/Balance/Balance.cj
|
|
|
27
27
|
const BridgeSummaryView = () => {
|
|
28
28
|
const { primaryWallet, setShowAuthFlow, appName, bridgeChains = [], } = useInternalDynamicContext.useInternalDynamicContext();
|
|
29
29
|
const { t } = reactI18next.useTranslation();
|
|
30
|
-
const onClickClose = () => setShowAuthFlow(false);
|
|
30
|
+
const onClickClose = () => setShowAuthFlow(false, { emitCancelAuth: true });
|
|
31
31
|
const body = React.useMemo(() => {
|
|
32
32
|
const blockchainNames = bridgeChains.map(({ chain }) => { var _a; return (_a = walletConnectorCore.getChainInfo(chain)) === null || _a === void 0 ? void 0 : _a.blockchainName; });
|
|
33
33
|
const [firstBlockchainName, secondBlockchainName] = blockchainNames;
|
|
@@ -23,7 +23,7 @@ import { Balance } from '../../widgets/DynamicWidget/components/Balance/Balance.
|
|
|
23
23
|
const BridgeSummaryView = () => {
|
|
24
24
|
const { primaryWallet, setShowAuthFlow, appName, bridgeChains = [], } = useInternalDynamicContext();
|
|
25
25
|
const { t } = useTranslation();
|
|
26
|
-
const onClickClose = () => setShowAuthFlow(false);
|
|
26
|
+
const onClickClose = () => setShowAuthFlow(false, { emitCancelAuth: true });
|
|
27
27
|
const body = useMemo(() => {
|
|
28
28
|
const blockchainNames = bridgeChains.map(({ chain }) => { var _a; return (_a = getChainInfo(chain)) === null || _a === void 0 ? void 0 : _a.blockchainName; });
|
|
29
29
|
const [firstBlockchainName, secondBlockchainName] = blockchainNames;
|
|
@@ -47,7 +47,7 @@ const BridgeWelcomeView = () => {
|
|
|
47
47
|
return undefined;
|
|
48
48
|
})
|
|
49
49
|
.filter(isChainInfoDefined), [bridgeChains]);
|
|
50
|
-
return (jsxRuntime.jsx(BridgeWelcomeLayout.BridgeWelcomeLayout, { onClickClose: () => setShowAuthFlow(false), title: t('dyn_bridge.welcome_view.title', { appName }), copykey: 'dyn_bridge.welcome_view.title', body: body, chains: chains, actionButtonText: t('dyn_bridge.welcome_view.button'), onClickAction: () => setView('wallet-list') }));
|
|
50
|
+
return (jsxRuntime.jsx(BridgeWelcomeLayout.BridgeWelcomeLayout, { onClickClose: () => setShowAuthFlow(false, { emitCancelAuth: true }), title: t('dyn_bridge.welcome_view.title', { appName }), copykey: 'dyn_bridge.welcome_view.title', body: body, chains: chains, actionButtonText: t('dyn_bridge.welcome_view.button'), onClickAction: () => setView('wallet-list') }));
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
exports.BridgeWelcomeView = BridgeWelcomeView;
|
|
@@ -43,7 +43,7 @@ const BridgeWelcomeView = () => {
|
|
|
43
43
|
return undefined;
|
|
44
44
|
})
|
|
45
45
|
.filter(isChainInfoDefined), [bridgeChains]);
|
|
46
|
-
return (jsx(BridgeWelcomeLayout, { onClickClose: () => setShowAuthFlow(false), title: t('dyn_bridge.welcome_view.title', { appName }), copykey: 'dyn_bridge.welcome_view.title', body: body, chains: chains, actionButtonText: t('dyn_bridge.welcome_view.button'), onClickAction: () => setView('wallet-list') }));
|
|
46
|
+
return (jsx(BridgeWelcomeLayout, { onClickClose: () => setShowAuthFlow(false, { emitCancelAuth: true }), title: t('dyn_bridge.welcome_view.title', { appName }), copykey: 'dyn_bridge.welcome_view.title', body: body, chains: chains, actionButtonText: t('dyn_bridge.welcome_view.button'), onClickAction: () => setView('wallet-list') }));
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
export { BridgeWelcomeView };
|
|
@@ -140,7 +140,7 @@ const EmbeddedRevealView = () => {
|
|
|
140
140
|
: 'height: 100px');
|
|
141
141
|
}
|
|
142
142
|
}, [iframeContainerRef, data, isTurnkeyHDWallet, exportPrivateKey]);
|
|
143
|
-
const closeButton = (jsxRuntime.jsx(IconButton.IconButton, { onClick: () => setShowAuthFlow(false), type: 'button', children: jsxRuntime.jsx(close.ReactComponent, {}) }));
|
|
143
|
+
const closeButton = (jsxRuntime.jsx(IconButton.IconButton, { onClick: () => setShowAuthFlow(false, { emitCancelAuth: true }), type: 'button', children: jsxRuntime.jsx(close.ReactComponent, {}) }));
|
|
144
144
|
const hasInjectedCredential = !isLoading && data && !error;
|
|
145
145
|
const credentialTitle = !isTurnkeyHDWallet || exportPrivateKey
|
|
146
146
|
? t('dyn_embedded_reveal.private_key_title')
|
|
@@ -136,7 +136,7 @@ const EmbeddedRevealView = () => {
|
|
|
136
136
|
: 'height: 100px');
|
|
137
137
|
}
|
|
138
138
|
}, [iframeContainerRef, data, isTurnkeyHDWallet, exportPrivateKey]);
|
|
139
|
-
const closeButton = (jsx(IconButton, { onClick: () => setShowAuthFlow(false), type: 'button', children: jsx(SvgClose, {}) }));
|
|
139
|
+
const closeButton = (jsx(IconButton, { onClick: () => setShowAuthFlow(false, { emitCancelAuth: true }), type: 'button', children: jsx(SvgClose, {}) }));
|
|
140
140
|
const hasInjectedCredential = !isLoading && data && !error;
|
|
141
141
|
const credentialTitle = !isTurnkeyHDWallet || exportPrivateKey
|
|
142
142
|
? t('dyn_embedded_reveal.private_key_title')
|
|
@@ -102,7 +102,7 @@ const MergeUserAccountsView = () => {
|
|
|
102
102
|
catch (e) {
|
|
103
103
|
setError(t('dyn_merge_user_accounts.errors.merge_error'));
|
|
104
104
|
if (user) {
|
|
105
|
-
setShowAuthFlow(false);
|
|
105
|
+
setShowAuthFlow(false, { emitCancelAuth: true });
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
108
|
goToInitialView();
|
|
@@ -113,7 +113,7 @@ const PasskeyInitRecovery = () => {
|
|
|
113
113
|
const translationKey = isTurnkeyWalletWithoutAuthenticator
|
|
114
114
|
? 'dyn_passkey_secure_modal'
|
|
115
115
|
: 'dyn_passkey_recovery';
|
|
116
|
-
const closeButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: () => setShowAuthFlow(false), "data-testid": 'close-button', children: jsxRuntime.jsx(close.ReactComponent, {}) }));
|
|
116
|
+
const closeButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: () => setShowAuthFlow(false, { emitCancelAuth: true }), "data-testid": 'close-button', children: jsxRuntime.jsx(close.ReactComponent, {}) }));
|
|
117
117
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, children: jsxRuntime.jsx(Typography.Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: t(`${translationKey}.start.title`) }) }), jsxRuntime.jsxs("div", { className: 'passkey-recovery-view', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: EmailIcon, isSpinning: isLoading, iconSize: 96 }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-recovery-view__subtitle', children: t(`${translationKey}.start.description`) }), errorText && jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: errorText }), jsxRuntime.jsx("div", { className: 'passkey-recovery-view__actions', children: jsxRuntime.jsx(Button.Button, { buttonPadding: 'large', dataTestId: 'passkey-recovery-button', onClick: () => initRecovery(), disabled: isLoading, showInternalLoading: false, children: jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Typography.Typography, { children: t(`${translationKey}.start.start_button`) }) }) }) }), jsxRuntime.jsx(NeedHelpSection.NeedHelpSection, {})] })] }));
|
|
118
118
|
};
|
|
119
119
|
|
|
@@ -109,7 +109,7 @@ const PasskeyInitRecovery = () => {
|
|
|
109
109
|
const translationKey = isTurnkeyWalletWithoutAuthenticator
|
|
110
110
|
? 'dyn_passkey_secure_modal'
|
|
111
111
|
: 'dyn_passkey_recovery';
|
|
112
|
-
const closeButton = (jsx(IconButton, { type: 'button', onClick: () => setShowAuthFlow(false), "data-testid": 'close-button', children: jsx(SvgClose, {}) }));
|
|
112
|
+
const closeButton = (jsx(IconButton, { type: 'button', onClick: () => setShowAuthFlow(false, { emitCancelAuth: true }), "data-testid": 'close-button', children: jsx(SvgClose, {}) }));
|
|
113
113
|
return (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: closeButton, children: jsx(Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: t(`${translationKey}.start.title`) }) }), jsxs("div", { className: 'passkey-recovery-view', children: [jsx(IconWithSpinner, { Icon: EmailIcon, isSpinning: isLoading, iconSize: 96 }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-recovery-view__subtitle', children: t(`${translationKey}.start.description`) }), errorText && jsx(ErrorContainer, { children: errorText }), jsx("div", { className: 'passkey-recovery-view__actions', children: jsx(Button, { buttonPadding: 'large', dataTestId: 'passkey-recovery-button', onClick: () => initRecovery(), disabled: isLoading, showInternalLoading: false, children: jsx("div", { children: jsx(Typography, { children: t(`${translationKey}.start.start_button`) }) }) }) }), jsx(NeedHelpSection, {})] })] }));
|
|
114
114
|
};
|
|
115
115
|
|
|
@@ -5,12 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var QRCodeUtil = require('qrcode');
|
|
8
|
-
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
9
8
|
var IconWithSpinner = require('../../components/IconWithSpinner/IconWithSpinner.cjs');
|
|
10
9
|
var QrCodeContext = require('../../context/QrCodeContext/QrCodeContext.cjs');
|
|
11
10
|
require('../../events/dynamicEvents.cjs');
|
|
12
11
|
require('@dynamic-labs/utils');
|
|
13
12
|
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
13
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
14
14
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
15
15
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
16
16
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
@@ -117,8 +117,7 @@ const QRCode = ({ ecl = 'M', Icon, logoMargin = 0, logoSize = 40, size = 250, va
|
|
|
117
117
|
}, [ecl, logoSize, size, value, accentColor]);
|
|
118
118
|
const logoPosition = size / 2 - logoSize / 2 - logoMargin;
|
|
119
119
|
const walletsWithoutIndicator = ['coinbase', 'walletconnect'];
|
|
120
|
-
const indicator = !walletKey ||
|
|
121
|
-
walletsWithoutIndicator.includes(walletConnectorCore.normalizeWalletName(walletKey))
|
|
120
|
+
const indicator = !walletKey || walletsWithoutIndicator.includes(walletKey)
|
|
122
121
|
? undefined
|
|
123
122
|
: 'walletConnect';
|
|
124
123
|
return (jsxRuntime.jsx("div", { className: 'qrcode__container', children: jsxRuntime.jsx("div", { className: 'qrcode', children: showQrCodeImage ? (jsxRuntime.jsx("img", { src: data, alt: '' })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("svg", { height: '100%', width: '100%', viewBox: `0 0 ${size} ${size}`, "data-testid": 'qr-code', children: [jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: 'clip-logo', children: jsxRuntime.jsx("rect", { height: logoSize, width: logoSize, x: logoPosition, y: logoPosition, rx: 7, ry: 7 }) }) }), jsxRuntime.jsx("rect", { fill: 'none', height: size, width: size }), dots] }), jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: Icon, iconSize: logoSize, isSpinning: true, className: 'qrcode__icon', indicator: indicator })] })) }) }));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import QRCodeUtil from 'qrcode';
|
|
4
|
-
import { normalizeWalletName } from '@dynamic-labs/wallet-connector-core';
|
|
5
4
|
import { IconWithSpinner } from '../../components/IconWithSpinner/IconWithSpinner.js';
|
|
6
5
|
import { useQrCodeContext } from '../../context/QrCodeContext/QrCodeContext.js';
|
|
7
6
|
import '../../events/dynamicEvents.js';
|
|
8
7
|
import '@dynamic-labs/utils';
|
|
9
8
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
9
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
10
10
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
11
11
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
12
12
|
import '../../context/ViewContext/ViewContext.js';
|
|
@@ -109,8 +109,7 @@ const QRCode = ({ ecl = 'M', Icon, logoMargin = 0, logoSize = 40, size = 250, va
|
|
|
109
109
|
}, [ecl, logoSize, size, value, accentColor]);
|
|
110
110
|
const logoPosition = size / 2 - logoSize / 2 - logoMargin;
|
|
111
111
|
const walletsWithoutIndicator = ['coinbase', 'walletconnect'];
|
|
112
|
-
const indicator = !walletKey ||
|
|
113
|
-
walletsWithoutIndicator.includes(normalizeWalletName(walletKey))
|
|
112
|
+
const indicator = !walletKey || walletsWithoutIndicator.includes(walletKey)
|
|
114
113
|
? undefined
|
|
115
114
|
: 'walletConnect';
|
|
116
115
|
return (jsx("div", { className: 'qrcode__container', children: jsx("div", { className: 'qrcode', children: showQrCodeImage ? (jsx("img", { src: data, alt: '' })) : (jsxs(Fragment, { children: [jsxs("svg", { height: '100%', width: '100%', viewBox: `0 0 ${size} ${size}`, "data-testid": 'qr-code', children: [jsx("defs", { children: jsx("clipPath", { id: 'clip-logo', children: jsx("rect", { height: logoSize, width: logoSize, x: logoPosition, y: logoPosition, rx: 7, ry: 7 }) }) }), jsx("rect", { fill: 'none', height: size, width: size }), dots] }), jsx(IconWithSpinner, { Icon: Icon, iconSize: logoSize, isSpinning: true, className: 'qrcode__icon', indicator: indicator })] })) }) }));
|
|
@@ -79,7 +79,9 @@ const WalletGroupView = () => {
|
|
|
79
79
|
const hardwareWallet = selectedWalletGroup.groupedWallets.find(isHardwareWallet);
|
|
80
80
|
const isHardwareWalletPresent = Boolean(hardwareWallet);
|
|
81
81
|
return (jsxRuntime.jsx(SelectWalletChainLayout.SelectWalletChainLayout, { HeaderIcon: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: (_a = walletBookData.brand) === null || _a === void 0 ? void 0 : _a.spriteId }), children: jsxRuntime.jsxs("div", { className: 'wallet-group__list', children: [isHardwareWalletPresent && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(HardwareWalletToggle.HardwareWalletToggle, { checked: isHardwareWalletEnabled, onChecked: setIsHardwareWalletEnabled }), jsxRuntime.jsx(Divider.Divider, {})] })), jsxRuntime.jsx("div", { className: 'select-wallet-chain-layout__list', children: wallets.map((wallet, index) => (jsxRuntime.jsx(WalletGroupItem.WalletGroupItem, { wallet: wallet, onClick: () => {
|
|
82
|
-
if (isHardwareWalletEnabled &&
|
|
82
|
+
if (isHardwareWalletEnabled &&
|
|
83
|
+
hardwareWallet &&
|
|
84
|
+
wallet.key === 'phantom') {
|
|
83
85
|
handleWalletItemClick(hardwareWallet);
|
|
84
86
|
return;
|
|
85
87
|
}
|
|
@@ -75,7 +75,9 @@ const WalletGroupView = () => {
|
|
|
75
75
|
const hardwareWallet = selectedWalletGroup.groupedWallets.find(isHardwareWallet);
|
|
76
76
|
const isHardwareWalletPresent = Boolean(hardwareWallet);
|
|
77
77
|
return (jsx(SelectWalletChainLayout, { HeaderIcon: jsx(WalletIcon, { walletKey: (_a = walletBookData.brand) === null || _a === void 0 ? void 0 : _a.spriteId }), children: jsxs("div", { className: 'wallet-group__list', children: [isHardwareWalletPresent && (jsxs(Fragment, { children: [jsx(HardwareWalletToggle, { checked: isHardwareWalletEnabled, onChecked: setIsHardwareWalletEnabled }), jsx(Divider, {})] })), jsx("div", { className: 'select-wallet-chain-layout__list', children: wallets.map((wallet, index) => (jsx(WalletGroupItem, { wallet: wallet, onClick: () => {
|
|
78
|
-
if (isHardwareWalletEnabled &&
|
|
78
|
+
if (isHardwareWalletEnabled &&
|
|
79
|
+
hardwareWallet &&
|
|
80
|
+
wallet.key === 'phantom') {
|
|
79
81
|
handleWalletItemClick(hardwareWallet);
|
|
80
82
|
return;
|
|
81
83
|
}
|
package/src/lib/views/WalletGroupView/components/HardwareWalletToggle/HardwareWalletToggle.cjs
CHANGED
|
@@ -15,7 +15,7 @@ require('../../../../context/ViewContext/ViewContext.cjs');
|
|
|
15
15
|
require('@dynamic-labs/sdk-api');
|
|
16
16
|
require('../../../../shared/logger.cjs');
|
|
17
17
|
require('@dynamic-labs/iconic');
|
|
18
|
-
var
|
|
18
|
+
var check = require('../../../../shared/assets/check.cjs');
|
|
19
19
|
require('@dynamic-labs/wallet-book');
|
|
20
20
|
require('../../../../utils/constants/colors.cjs');
|
|
21
21
|
require('../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
@@ -42,31 +42,33 @@ require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
|
42
42
|
require('../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
43
43
|
require('../../../../context/FooterAnimationContext/index.cjs');
|
|
44
44
|
require('../../../../context/QrCodeContext/QrCodeContext.cjs');
|
|
45
|
-
var Tooltip = require('../../../../components/Tooltip/Tooltip.cjs');
|
|
46
45
|
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
47
46
|
require('../../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
48
47
|
require('react-focus-lock');
|
|
49
48
|
require('../../../../context/LoadingContext/LoadingContext.cjs');
|
|
50
49
|
require('qrcode');
|
|
50
|
+
var Icon = require('../../../../components/Icon/Icon.cjs');
|
|
51
51
|
require('i18next');
|
|
52
52
|
require('../../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
53
53
|
require('../../../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
54
54
|
require('formik');
|
|
55
|
-
|
|
55
|
+
require('../../../../components/IconButton/IconButton.cjs');
|
|
56
56
|
require('../../../../components/Alert/Alert.cjs');
|
|
57
57
|
require('@dynamic-labs/viem-utils');
|
|
58
58
|
require('../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
59
|
-
var Checkbox = require('../../../../components/Checkbox/Checkbox.cjs');
|
|
60
59
|
var ListTile = require('../../../../components/ListTile/ListTile.cjs');
|
|
61
60
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
62
61
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
63
62
|
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
64
63
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
64
|
+
var Toggle = require('../../../../components/Toggle/Toggle.cjs');
|
|
65
65
|
|
|
66
66
|
const HardwareWalletToggle = ({ checked, onChecked, }) => {
|
|
67
67
|
const { t } = reactI18next.useTranslation();
|
|
68
|
-
const
|
|
69
|
-
|
|
68
|
+
const toggle = (jsxRuntime.jsx(Toggle.Toggle, { checked: checked, onChange: () => onChecked(!checked), "data-testid": 'hardware-wallet-toggle', icon:
|
|
69
|
+
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
70
|
+
jsxRuntime.jsx(Icon.Icon, { size: 'small', children: jsxRuntime.jsx(check.ReactComponent, {}) }) }));
|
|
71
|
+
return (jsxRuntime.jsx(ListTile.ListTile, { disabled: true, trailing: toggle, children: jsxRuntime.jsx("span", { copykey: 'dyn_select_chain.using_hardware_wallet_toggle_label', children: t('dyn_select_chain.using_hardware_wallet_toggle_label') }) }));
|
|
70
72
|
};
|
|
71
73
|
|
|
72
74
|
exports.HardwareWalletToggle = HardwareWalletToggle;
|
package/src/lib/views/WalletGroupView/components/HardwareWalletToggle/HardwareWalletToggle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '../../../../events/dynamicEvents.js';
|
|
@@ -11,7 +11,7 @@ import '../../../../context/ViewContext/ViewContext.js';
|
|
|
11
11
|
import '@dynamic-labs/sdk-api';
|
|
12
12
|
import '../../../../shared/logger.js';
|
|
13
13
|
import '@dynamic-labs/iconic';
|
|
14
|
-
import { ReactComponent as
|
|
14
|
+
import { ReactComponent as SvgCheck } from '../../../../shared/assets/check.js';
|
|
15
15
|
import '@dynamic-labs/wallet-book';
|
|
16
16
|
import '../../../../utils/constants/colors.js';
|
|
17
17
|
import '../../../../shared/utils/classes/storage/localStorage.js';
|
|
@@ -38,31 +38,33 @@ import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
|
38
38
|
import '../../../../components/OverlayCard/OverlayCard.context.js';
|
|
39
39
|
import '../../../../context/FooterAnimationContext/index.js';
|
|
40
40
|
import '../../../../context/QrCodeContext/QrCodeContext.js';
|
|
41
|
-
import { Tooltip } from '../../../../components/Tooltip/Tooltip.js';
|
|
42
41
|
import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
43
42
|
import '../../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
44
43
|
import 'react-focus-lock';
|
|
45
44
|
import '../../../../context/LoadingContext/LoadingContext.js';
|
|
46
45
|
import 'qrcode';
|
|
46
|
+
import { Icon } from '../../../../components/Icon/Icon.js';
|
|
47
47
|
import 'i18next';
|
|
48
48
|
import '../../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
49
49
|
import '../../../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
50
50
|
import 'formik';
|
|
51
|
-
import
|
|
51
|
+
import '../../../../components/IconButton/IconButton.js';
|
|
52
52
|
import '../../../../components/Alert/Alert.js';
|
|
53
53
|
import '@dynamic-labs/viem-utils';
|
|
54
54
|
import '../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
55
|
-
import { Checkbox } from '../../../../components/Checkbox/Checkbox.js';
|
|
56
55
|
import { ListTile } from '../../../../components/ListTile/ListTile.js';
|
|
57
56
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
58
57
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
59
58
|
import '../../../../components/Popper/Popper/Popper.js';
|
|
60
59
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
60
|
+
import { Toggle } from '../../../../components/Toggle/Toggle.js';
|
|
61
61
|
|
|
62
62
|
const HardwareWalletToggle = ({ checked, onChecked, }) => {
|
|
63
63
|
const { t } = useTranslation();
|
|
64
|
-
const
|
|
65
|
-
|
|
64
|
+
const toggle = (jsx(Toggle, { checked: checked, onChange: () => onChecked(!checked), "data-testid": 'hardware-wallet-toggle', icon:
|
|
65
|
+
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
66
|
+
jsx(Icon, { size: 'small', children: jsx(SvgCheck, {}) }) }));
|
|
67
|
+
return (jsx(ListTile, { disabled: true, trailing: toggle, children: jsx("span", { copykey: 'dyn_select_chain.using_hardware_wallet_toggle_label', children: t('dyn_select_chain.using_hardware_wallet_toggle_label') }) }));
|
|
66
68
|
};
|
|
67
69
|
|
|
68
70
|
export { HardwareWalletToggle };
|
|
@@ -34,7 +34,6 @@ var getSiweStatement = require('../../utils/functions/getSiweStatement/getSiweSt
|
|
|
34
34
|
var getWalletProvider = require('../../utils/functions/getWalletProvider/getWalletProvider.cjs');
|
|
35
35
|
require('../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
36
36
|
require('react-dom');
|
|
37
|
-
var isSameWalletName = require('../../utils/functions/isSameWalletName/isSameWalletName.cjs');
|
|
38
37
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
39
38
|
require('@dynamic-labs/types');
|
|
40
39
|
require('yup');
|
|
@@ -88,14 +87,14 @@ const WalletUsedView = () => {
|
|
|
88
87
|
}, [walletConnector]);
|
|
89
88
|
const _shortenWalletAddress = shortenWalletAddress.shortenWalletAddress(walletAddress);
|
|
90
89
|
const updatePrimaryWalletId = (walletConnector, user) => {
|
|
91
|
-
const
|
|
90
|
+
const newWalletKey = walletConnector.key;
|
|
92
91
|
if (user.lastVerifiedCredentialId) {
|
|
93
92
|
if (!primaryWallet) {
|
|
94
93
|
setPrimaryWalletId(user.lastVerifiedCredentialId);
|
|
95
94
|
return;
|
|
96
95
|
}
|
|
97
|
-
const
|
|
98
|
-
if (
|
|
96
|
+
const currentPrimaryWalletKey = primaryWallet.connector.key;
|
|
97
|
+
if (newWalletKey === currentPrimaryWalletKey) {
|
|
99
98
|
setPrimaryWalletId(user.lastVerifiedCredentialId);
|
|
100
99
|
}
|
|
101
100
|
// if both wallets are flow wallets, set the last verified wallet as primary
|
|
@@ -149,13 +148,14 @@ const WalletUsedView = () => {
|
|
|
149
148
|
setCallback('linkSuccess', {
|
|
150
149
|
walletId: decodedJwt.lastVerifiedCredentialId,
|
|
151
150
|
});
|
|
151
|
+
setShowAuthFlow(false);
|
|
152
152
|
}
|
|
153
153
|
catch (error) {
|
|
154
154
|
logger.logger.error(error);
|
|
155
|
+
setShowAuthFlow(false, { emitCancelAuth: true });
|
|
155
156
|
}
|
|
156
157
|
finally {
|
|
157
158
|
setLoading(false);
|
|
158
|
-
setShowAuthFlow(false);
|
|
159
159
|
setMultiWalletWidgetState('idle');
|
|
160
160
|
}
|
|
161
161
|
});
|
|
@@ -30,7 +30,6 @@ import { getSiweStatement } from '../../utils/functions/getSiweStatement/getSiwe
|
|
|
30
30
|
import { getWalletProvider } from '../../utils/functions/getWalletProvider/getWalletProvider.js';
|
|
31
31
|
import '../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
32
32
|
import 'react-dom';
|
|
33
|
-
import { isSameWalletName } from '../../utils/functions/isSameWalletName/isSameWalletName.js';
|
|
34
33
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
35
34
|
import '@dynamic-labs/types';
|
|
36
35
|
import 'yup';
|
|
@@ -84,14 +83,14 @@ const WalletUsedView = () => {
|
|
|
84
83
|
}, [walletConnector]);
|
|
85
84
|
const _shortenWalletAddress = shortenWalletAddress(walletAddress);
|
|
86
85
|
const updatePrimaryWalletId = (walletConnector, user) => {
|
|
87
|
-
const
|
|
86
|
+
const newWalletKey = walletConnector.key;
|
|
88
87
|
if (user.lastVerifiedCredentialId) {
|
|
89
88
|
if (!primaryWallet) {
|
|
90
89
|
setPrimaryWalletId(user.lastVerifiedCredentialId);
|
|
91
90
|
return;
|
|
92
91
|
}
|
|
93
|
-
const
|
|
94
|
-
if (
|
|
92
|
+
const currentPrimaryWalletKey = primaryWallet.connector.key;
|
|
93
|
+
if (newWalletKey === currentPrimaryWalletKey) {
|
|
95
94
|
setPrimaryWalletId(user.lastVerifiedCredentialId);
|
|
96
95
|
}
|
|
97
96
|
// if both wallets are flow wallets, set the last verified wallet as primary
|
|
@@ -145,13 +144,14 @@ const WalletUsedView = () => {
|
|
|
145
144
|
setCallback('linkSuccess', {
|
|
146
145
|
walletId: decodedJwt.lastVerifiedCredentialId,
|
|
147
146
|
});
|
|
147
|
+
setShowAuthFlow(false);
|
|
148
148
|
}
|
|
149
149
|
catch (error) {
|
|
150
150
|
logger.error(error);
|
|
151
|
+
setShowAuthFlow(false, { emitCancelAuth: true });
|
|
151
152
|
}
|
|
152
153
|
finally {
|
|
153
154
|
setLoading(false);
|
|
154
|
-
setShowAuthFlow(false);
|
|
155
155
|
setMultiWalletWidgetState('idle');
|
|
156
156
|
}
|
|
157
157
|
});
|
|
@@ -14,7 +14,7 @@ var UserProfileForm = require('../../../../components/UserProfileForm/UserProfil
|
|
|
14
14
|
const EditProfileView = () => {
|
|
15
15
|
const { setView } = ViewContext.useViewContext();
|
|
16
16
|
const { goToProfileView } = DynamicBridgeWidgetContext.useDynamicBridgeWidgetContext();
|
|
17
|
-
const {
|
|
17
|
+
const { setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
|
|
18
18
|
const { updateUser } = useUserUpdateRequest.useUserUpdateRequestInternal({
|
|
19
19
|
validationSchemaStripUnknown: true,
|
|
20
20
|
});
|
|
@@ -22,10 +22,13 @@ const EditProfileView = () => {
|
|
|
22
22
|
const { isEmailVerificationRequired } = yield updateUser(formValues);
|
|
23
23
|
goToProfileView();
|
|
24
24
|
if (isEmailVerificationRequired) {
|
|
25
|
-
|
|
25
|
+
setShowAuthFlow(true, {
|
|
26
|
+
ignoreIfIsEmbeddedWidget: false,
|
|
27
|
+
performMultiWalletChecks: false,
|
|
28
|
+
});
|
|
26
29
|
setView('verify-email');
|
|
27
30
|
}
|
|
28
|
-
}), [goToProfileView,
|
|
31
|
+
}), [goToProfileView, setShowAuthFlow, setView, updateUser]);
|
|
29
32
|
return (jsxRuntime.jsx(UserProfileForm.UserProfileForm, { onEditProfileSubmit: onEditProfileFormSubmit, onEditProfileCancel: goToProfileView }));
|
|
30
33
|
};
|
|
31
34
|
|
|
@@ -10,7 +10,7 @@ import { UserProfileForm } from '../../../../components/UserProfileForm/UserProf
|
|
|
10
10
|
const EditProfileView = () => {
|
|
11
11
|
const { setView } = useViewContext();
|
|
12
12
|
const { goToProfileView } = useDynamicBridgeWidgetContext();
|
|
13
|
-
const {
|
|
13
|
+
const { setShowAuthFlow } = useInternalDynamicContext();
|
|
14
14
|
const { updateUser } = useUserUpdateRequestInternal({
|
|
15
15
|
validationSchemaStripUnknown: true,
|
|
16
16
|
});
|
|
@@ -18,10 +18,13 @@ const EditProfileView = () => {
|
|
|
18
18
|
const { isEmailVerificationRequired } = yield updateUser(formValues);
|
|
19
19
|
goToProfileView();
|
|
20
20
|
if (isEmailVerificationRequired) {
|
|
21
|
-
|
|
21
|
+
setShowAuthFlow(true, {
|
|
22
|
+
ignoreIfIsEmbeddedWidget: false,
|
|
23
|
+
performMultiWalletChecks: false,
|
|
24
|
+
});
|
|
22
25
|
setView('verify-email');
|
|
23
26
|
}
|
|
24
|
-
}), [goToProfileView,
|
|
27
|
+
}), [goToProfileView, setShowAuthFlow, setView, updateUser]);
|
|
25
28
|
return (jsx(UserProfileForm, { onEditProfileSubmit: onEditProfileFormSubmit, onEditProfileCancel: goToProfileView }));
|
|
26
29
|
};
|
|
27
30
|
|
package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs
CHANGED
|
@@ -5,12 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var reactI18next = require('react-i18next');
|
|
8
|
-
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
9
8
|
var bitcoin = require('@dynamic-labs/bitcoin');
|
|
10
9
|
var classNames = require('../../../../utils/functions/classNames/classNames.cjs');
|
|
11
10
|
require('../../../../events/dynamicEvents.cjs');
|
|
12
11
|
require('@dynamic-labs/utils');
|
|
13
12
|
var useInternalDynamicContext = require('../../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
13
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
14
14
|
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
15
15
|
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
16
16
|
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
@@ -104,8 +104,7 @@ const ActiveWalletInformation = () => {
|
|
|
104
104
|
{
|
|
105
105
|
Icon: null,
|
|
106
106
|
callback: () => setDynamicWidgetView('wallet-settings'),
|
|
107
|
-
hide: !(wallet &&
|
|
108
|
-
walletConnectorCore.normalizeWalletName(wallet.connector.name).startsWith('turnkey')),
|
|
107
|
+
hide: !(wallet && wallet.connector.key.startsWith('turnkey')),
|
|
109
108
|
text: 'Wallet settings',
|
|
110
109
|
},
|
|
111
110
|
{
|
package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { normalizeWalletName } from '@dynamic-labs/wallet-connector-core';
|
|
5
4
|
import { isBitcoinConnector } from '@dynamic-labs/bitcoin';
|
|
6
5
|
import { classNames } from '../../../../utils/functions/classNames/classNames.js';
|
|
7
6
|
import '../../../../events/dynamicEvents.js';
|
|
8
7
|
import '@dynamic-labs/utils';
|
|
9
8
|
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
9
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
10
10
|
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
11
11
|
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
12
12
|
import '../../../../context/ViewContext/ViewContext.js';
|
|
@@ -100,8 +100,7 @@ const ActiveWalletInformation = () => {
|
|
|
100
100
|
{
|
|
101
101
|
Icon: null,
|
|
102
102
|
callback: () => setDynamicWidgetView('wallet-settings'),
|
|
103
|
-
hide: !(wallet &&
|
|
104
|
-
normalizeWalletName(wallet.connector.name).startsWith('turnkey')),
|
|
103
|
+
hide: !(wallet && wallet.connector.key.startsWith('turnkey')),
|
|
105
104
|
text: 'Wallet settings',
|
|
106
105
|
},
|
|
107
106
|
{
|