@dynamic-labs/sdk-react-core 3.0.0-alpha.52 → 3.0.0-alpha.54
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 +46 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +13 -13
- package/src/index.cjs +8 -6
- package/src/index.d.ts +1 -1
- package/src/index.js +5 -4
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +18 -30
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.d.ts +1 -1
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +19 -31
- package/src/lib/components/Divider/Divider.cjs +3 -3
- package/src/lib/components/Divider/Divider.d.ts +2 -2
- package/src/lib/components/Divider/Divider.js +4 -4
- package/src/lib/components/EmailForm/EmailForm.cjs +1 -1
- package/src/lib/components/EmailForm/EmailForm.js +1 -1
- package/src/lib/components/IconWithSpinner/IconWithSpinner.cjs +1 -1
- package/src/lib/components/IconWithSpinner/IconWithSpinner.js +1 -1
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.cjs +1 -1
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.js +1 -1
- package/src/lib/components/IconWithStatus/IconWithStatus.cjs +1 -1
- package/src/lib/components/IconWithStatus/IconWithStatus.js +1 -1
- package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +5 -4
- package/src/lib/components/NeedHelpSection/NeedHelpSection.js +6 -5
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +1 -1
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +1 -1
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +1 -1
- package/src/lib/components/NetworkPicker/components/Network/Network.js +1 -1
- package/src/lib/components/NetworkPicker/components/NetworkControlSkeleton/NetworkControlSkeleton.cjs +1 -1
- package/src/lib/components/NetworkPicker/components/NetworkControlSkeleton/NetworkControlSkeleton.js +1 -1
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +1 -1
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +1 -1
- package/src/lib/components/PhoneNumberField/PhoneNumberField.cjs +1 -1
- package/src/lib/components/PhoneNumberField/PhoneNumberField.js +1 -1
- package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.cjs +1 -1
- package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.js +1 -1
- package/src/lib/components/QrCodeWrapper/QrCodeWrapper.cjs +2 -2
- package/src/lib/components/QrCodeWrapper/QrCodeWrapper.js +2 -2
- package/src/lib/components/RenderView/RenderView.cjs +1 -1
- package/src/lib/components/RenderView/RenderView.js +1 -1
- package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.cjs +11 -10
- package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.js +12 -11
- package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +3 -2
- package/src/lib/components/SendBalanceForm/SendBalanceForm.d.ts +0 -1
- package/src/lib/components/SendBalanceForm/SendBalanceForm.js +3 -2
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +7 -4
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.d.ts +0 -2
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +7 -4
- package/src/lib/components/SendBalancePageLayout/components/TokensBalanceDropdown/TokensBalanceDropdown.cjs +8 -3
- package/src/lib/components/SendBalancePageLayout/components/TokensBalanceDropdown/TokensBalanceDropdown.d.ts +0 -1
- package/src/lib/components/SendBalancePageLayout/components/TokensBalanceDropdown/TokensBalanceDropdown.js +8 -3
- package/src/lib/components/SendBalancePageLayout/utils.cjs +3 -1
- package/src/lib/components/SendBalancePageLayout/utils.d.ts +1 -1
- package/src/lib/components/SendBalancePageLayout/utils.js +3 -1
- package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.cjs +1 -1
- package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.js +1 -1
- package/src/lib/components/TransactionCard/TransactionCard.cjs +2 -2
- package/src/lib/components/TransactionCard/TransactionCard.d.ts +1 -2
- package/src/lib/components/TransactionCard/TransactionCard.js +2 -2
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +24 -22
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.d.ts +0 -3
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +24 -22
- package/src/lib/components/TransactionConfirmationPageLayout/utils.cjs +2 -2
- package/src/lib/components/TransactionConfirmationPageLayout/utils.d.ts +1 -1
- package/src/lib/components/TransactionConfirmationPageLayout/utils.js +2 -2
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +4 -2
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.d.ts +0 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +4 -2
- package/src/lib/components/UserProfile/UserProfile.cjs +1 -1
- package/src/lib/components/UserProfile/UserProfile.js +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +1 -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 +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +1 -1
- package/src/lib/context/DynamicContext/DynamicContext.cjs +9 -13
- package/src/lib/context/DynamicContext/DynamicContext.js +9 -13
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.cjs +1 -1
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.js +1 -1
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/types.d.ts +2 -2
- package/src/lib/context/DynamicContext/types/DynamicContextProps.d.ts +9 -4
- package/src/lib/context/DynamicContext/types/IDynamicContext.d.ts +6 -5
- package/src/lib/context/DynamicContext/types/SocialSettings.d.ts +7 -0
- package/src/lib/context/DynamicContext/types/index.d.ts +1 -0
- package/src/lib/context/MockContext/MockContext.cjs +1 -1
- package/src/lib/context/MockContext/MockContext.js +1 -1
- package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.d.ts +2 -2
- package/src/lib/context/ReinitializeContext/ReinitializeContextProvider.cjs +1 -1
- package/src/lib/context/ReinitializeContext/ReinitializeContextProvider.js +1 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.d.ts +2 -2
- package/src/lib/context/UserWalletsContext/UserWalletsContext.d.ts +1 -1
- package/src/lib/context/WalletContext/WalletContext.cjs +1 -84
- package/src/lib/context/WalletContext/WalletContext.d.ts +1 -2
- package/src/lib/context/WalletContext/WalletContext.js +1 -84
- package/src/lib/context/WidgetRegistry/WidgetRegistryContextProvider.cjs +1 -1
- package/src/lib/context/WidgetRegistry/WidgetRegistryContextProvider.js +1 -1
- package/src/lib/data/api/api.cjs +1 -1
- package/src/lib/data/api/api.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +1 -1
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +1 -1
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +1 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +1 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +1 -1
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +1 -1
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +1 -1
- package/src/lib/locale/en/translation.cjs +39 -5
- package/src/lib/locale/en/translation.d.ts +39 -5
- package/src/lib/locale/en/translation.js +39 -5
- package/src/lib/modals/ConfirmationModal/ConfirmationModal.cjs +1 -1
- package/src/lib/modals/ConfirmationModal/ConfirmationModal.js +1 -1
- package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.cjs +1 -1
- package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.js +1 -1
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +1 -1
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +1 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +11 -10
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +12 -11
- package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.cjs +4 -4
- package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.d.ts +1 -1
- package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.js +4 -4
- package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.types.d.ts +2 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +2 -9
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +2 -9
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.cjs +1 -1
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.js +1 -1
- package/src/lib/shared/assets/arrow-circle-right.cjs +54 -0
- package/src/lib/shared/assets/arrow-circle-right.js +30 -0
- package/src/lib/shared/assets/index.d.ts +1 -0
- package/src/lib/shared/types/wallets.d.ts +2 -2
- package/src/lib/shared/utils/functions/usingSessionKeys/usingSessionKeys.cjs +1 -1
- package/src/lib/shared/utils/functions/usingSessionKeys/usingSessionKeys.js +2 -2
- package/src/lib/shared/utils/functions/wallet/createWallet.d.ts +2 -2
- package/src/lib/store/actions/sendBalanceActions/index.d.ts +1 -1
- package/src/lib/store/actions/sendBalanceActions/sendBalanceActions.cjs +8 -0
- package/src/lib/store/actions/sendBalanceActions/sendBalanceActions.d.ts +1 -0
- package/src/lib/store/actions/sendBalanceActions/sendBalanceActions.js +8 -1
- package/src/lib/store/store.cjs +2 -0
- package/src/lib/store/store.js +2 -0
- package/src/lib/store/types.d.ts +2 -0
- package/src/lib/store/utils/storeAuthTokenAndUser/storeAuthTokenAndUser.cjs +1 -1
- package/src/lib/store/utils/storeAuthTokenAndUser/storeAuthTokenAndUser.js +1 -1
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/errors.cjs +0 -2
- package/src/lib/utils/constants/errors.js +1 -2
- package/src/lib/utils/functions/fiatUtils/fiatUtils.d.ts +2 -2
- package/src/lib/utils/functions/findTurnkeyWallet/findTurnkeyWallet.d.ts +2 -2
- package/src/lib/utils/{hooks/useWalletConnectors/utils/findWallet/findWallet.cjs → functions/findWalletOptionFor/findWalletOptionFor.cjs} +3 -3
- package/src/lib/utils/functions/findWalletOptionFor/findWalletOptionFor.d.ts +3 -0
- package/src/lib/utils/{hooks/useWalletConnectors/utils/findWallet/findWallet.js → functions/findWalletOptionFor/findWalletOptionFor.js} +3 -3
- package/src/lib/utils/functions/findWalletOptionFor/index.d.ts +1 -0
- package/src/lib/utils/functions/generateMessages/index.cjs +3 -2
- package/src/lib/utils/functions/generateMessages/index.js +3 -2
- package/src/lib/utils/functions/getEmbeddedWalletAuthHandler/getEmbeddedWalletAuthHandler.d.ts +2 -2
- package/src/lib/utils/functions/getEnabledEmbeddedWalletProviders/getEnabledEmbeddedWalletProviders.cjs +1 -1
- package/src/lib/utils/functions/getEnabledEmbeddedWalletProviders/getEnabledEmbeddedWalletProviders.js +1 -1
- package/src/lib/utils/functions/getUserIdentifier/getUserIdentifier.cjs +1 -1
- package/src/lib/utils/functions/getUserIdentifier/getUserIdentifier.js +1 -1
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.d.ts +1 -2
- package/src/lib/utils/functions/getWalletConnectorForWallet/getWalletConnectorForWallet.d.ts +2 -2
- package/src/lib/utils/functions/index.d.ts +0 -2
- package/src/lib/utils/functions/isAccountAbstractionWallet/isAccountAbstractionWallet.d.ts +1 -1
- package/src/lib/utils/functions/isAllowedToLinkWallet/isAllowedToLinkWallet.cjs +1 -1
- package/src/lib/utils/functions/isAllowedToLinkWallet/isAllowedToLinkWallet.js +1 -1
- package/src/lib/utils/functions/isPhoneNumberProviderEnabled/isPhoneNumberProviderEnabled.cjs +1 -1
- package/src/lib/utils/functions/isPhoneNumberProviderEnabled/isPhoneNumberProviderEnabled.js +1 -1
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/requiresPasswordForEmbeddedWalletOnSignup.cjs +1 -1
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/requiresPasswordForEmbeddedWalletOnSignup.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.d.ts +2 -2
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.d.ts +2 -2
- package/src/lib/utils/hooks/index.d.ts +1 -0
- package/src/lib/utils/hooks/multiWallet/index.d.ts +0 -1
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +8 -7
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +2 -2
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +9 -8
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.d.ts +2 -2
- package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.d.ts +1 -1
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +3 -4
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +3 -4
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.d.ts +1 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.cjs +4 -6
- package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.d.ts +1 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.js +5 -7
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.cjs +86 -61
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.d.ts +3 -3
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.js +87 -63
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.cjs +32 -30
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.d.ts +1 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.js +33 -31
- package/src/lib/utils/hooks/useEmbeddedWalletAuthenticator/useEmbeddedWalletAuthenticator.d.ts +1 -1
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.cjs +7 -6
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.js +7 -6
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.cjs +11 -9
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.js +12 -10
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs +8 -12
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js +8 -12
- package/src/lib/utils/hooks/useNetworkDataFromWallet/useNetworkDataFromWallet.cjs +1 -1
- package/src/lib/utils/hooks/useNetworkDataFromWallet/useNetworkDataFromWallet.js +1 -1
- package/src/lib/utils/hooks/useNetworkNotSupported/useNetworkNotSupported.cjs +6 -5
- package/src/lib/utils/hooks/useNetworkNotSupported/useNetworkNotSupported.js +6 -5
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +12 -11
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.d.ts +2 -2
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +12 -11
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.cjs +3 -3
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.js +3 -3
- package/src/lib/utils/hooks/useSmartWallets/index.d.ts +1 -0
- package/src/lib/utils/hooks/useSmartWallets/useSmartWallets.cjs +159 -0
- package/src/lib/utils/hooks/useSmartWallets/useSmartWallets.d.ts +18 -0
- package/src/lib/utils/hooks/useSmartWallets/useSmartWallets.js +155 -0
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +6 -1
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +7 -2
- package/src/lib/utils/hooks/useSwitchWallet/useSwitchWallet.cjs +1 -4
- package/src/lib/utils/hooks/useSwitchWallet/useSwitchWallet.js +1 -4
- package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.cjs +3 -0
- package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.js +3 -0
- package/src/lib/utils/hooks/useWalletConnectorOptions/useWalletConnectorOptions.cjs +1 -1
- package/src/lib/utils/hooks/useWalletConnectorOptions/useWalletConnectorOptions.d.ts +2 -2
- package/src/lib/utils/hooks/useWalletConnectorOptions/useWalletConnectorOptions.js +1 -1
- package/src/lib/utils/hooks/useWalletConnectorOptions/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs +1 -1
- package/src/lib/utils/hooks/useWalletConnectorOptions/utils/verifyMagicIsSetup/verifyMagicIsSetup.js +1 -1
- package/src/lib/utils/hooks/useWalletConnectorOptions/utils/verifyZeroDevIsSetup/verifyZeroDevIsSetup.cjs +1 -1
- package/src/lib/utils/hooks/useWalletConnectorOptions/utils/verifyZeroDevIsSetup/verifyZeroDevIsSetup.js +1 -1
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.cjs +7 -87
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.d.ts +2 -2
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.js +8 -88
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +9 -79
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.d.ts +4 -10
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +10 -80
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.cjs +5 -89
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.d.ts +2 -3
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.js +5 -89
- package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.cjs +4 -4
- package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.js +5 -5
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +26 -29
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +2 -1
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +26 -29
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +1 -1
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.d.ts +6 -6
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +1 -1
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.types.d.ts +4 -4
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +16 -7
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.d.ts +2 -2
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +16 -7
- package/src/lib/views/AccessBlockedView/AccessBlockedView.cjs +1 -1
- package/src/lib/views/AccessBlockedView/AccessBlockedView.js +1 -1
- package/src/lib/views/AccountExistsView/AccountExistsView.cjs +1 -1
- package/src/lib/views/AccountExistsView/AccountExistsView.js +1 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +1 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +1 -1
- package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.cjs +1 -1
- package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.js +1 -1
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +1 -1
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +1 -1
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +1 -1
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +1 -1
- package/src/lib/views/CollectUserDataView/UserDataFields/UserField/UserField.cjs +2 -2
- package/src/lib/views/CollectUserDataView/UserDataFields/UserField/UserField.js +2 -2
- package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.cjs +1 -1
- package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.js +1 -1
- package/src/lib/views/CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.cjs +1 -1
- package/src/lib/views/CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.js +1 -1
- package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.cjs +1 -1
- package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.js +1 -1
- package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.cjs +3 -3
- package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.js +3 -3
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -1
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -1
- package/src/lib/views/EmailVerification/EmailVerification.cjs +20 -19
- package/src/lib/views/EmailVerification/EmailVerification.js +21 -20
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -1
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -1
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +52 -52
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +53 -53
- package/src/lib/views/EnterPasswordView/EnterPasswordView.cjs +1 -1
- package/src/lib/views/EnterPasswordView/EnterPasswordView.js +1 -1
- package/src/lib/views/FarcasterConnectView/FarcasterConnectView.cjs +1 -1
- package/src/lib/views/FarcasterConnectView/FarcasterConnectView.js +1 -1
- package/src/lib/views/GlobalWalletConfirmView/GlobalWalletConfirmView.cjs +1 -1
- package/src/lib/views/GlobalWalletConfirmView/GlobalWalletConfirmView.js +1 -1
- package/src/lib/views/LoginView/LoginViewSection/LoginViewSection.cjs +1 -1
- package/src/lib/views/LoginView/LoginViewSection/LoginViewSection.js +1 -1
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +1 -1
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +1 -1
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs +1 -1
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js +1 -1
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +1 -1
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +1 -1
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +1 -1
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +1 -1
- package/src/lib/views/LoginView/sections/ToggleableSection/ToggleableSection.cjs +1 -1
- package/src/lib/views/LoginView/sections/ToggleableSection/ToggleableSection.js +1 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +2 -2
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +2 -2
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.cjs +1 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.js +1 -1
- package/src/lib/views/MergeUserAccountsConflictsView/MergeUserAccountsConflictsView.cjs +1 -1
- package/src/lib/views/MergeUserAccountsConflictsView/MergeUserAccountsConflictsView.js +1 -1
- package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.cjs +1 -1
- package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.js +1 -1
- package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.cjs +1 -1
- package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.js +1 -1
- package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.cjs +2 -2
- package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.js +2 -2
- package/src/lib/views/MfaRecoveryView/MfaRecoveryView.cjs +1 -1
- package/src/lib/views/MfaRecoveryView/MfaRecoveryView.js +1 -1
- package/src/lib/views/MfaSecureDeviceHelpView/MfaSecureDeviceHelpView.cjs +1 -1
- package/src/lib/views/MfaSecureDeviceHelpView/MfaSecureDeviceHelpView.js +1 -1
- package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.cjs +1 -1
- package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.js +1 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +1 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +1 -1
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +1 -1
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +1 -1
- package/src/lib/views/NoAccess/NoAccess.cjs +1 -1
- package/src/lib/views/NoAccess/NoAccess.js +1 -1
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +1 -1
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +1 -1
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +1 -1
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoice/AuthChoiceInfo/AuthChoiceInfo.cjs +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoice/AuthChoiceInfo/AuthChoiceInfo.js +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.cjs +35 -33
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.d.ts +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.js +35 -33
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.cjs +2 -2
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.js +2 -2
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.cjs +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.js +1 -1
- package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.cjs +1 -1
- package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.js +1 -1
- package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.cjs +2 -2
- package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.js +2 -2
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.cjs +35 -33
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.d.ts +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.js +35 -33
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.cjs +33 -31
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.js +33 -31
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +2 -2
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +2 -2
- package/src/lib/views/Passkey/RenamePasskeyView/RenamePasskeyView.cjs +1 -1
- package/src/lib/views/Passkey/RenamePasskeyView/RenamePasskeyView.js +1 -1
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +1 -1
- package/src/lib/views/PendingConnectView/PendingConnectView.js +1 -1
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +1 -1
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +1 -1
- package/src/lib/views/SandboxMaximumThresholdReached/SandboxMaximumThresholdReached.cjs +1 -1
- package/src/lib/views/SandboxMaximumThresholdReached/SandboxMaximumThresholdReached.js +1 -1
- package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.cjs +1 -1
- package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.js +1 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +28 -11
- package/src/lib/views/SendBalanceView/SendBalanceView.js +28 -11
- package/src/lib/views/SmsVerification/SmsVerification.cjs +1 -1
- package/src/lib/views/SmsVerification/SmsVerification.js +1 -1
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -1
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -1
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +1 -1
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +1 -1
- package/src/lib/{utils/functions/getEOAWallet/getEOAWallet.cjs → views/SyncWalletView/AutoReconnectingView/AutoReconnectingView.cjs} +57 -50
- package/src/lib/views/SyncWalletView/AutoReconnectingView/AutoReconnectingView.d.ts +9 -0
- package/src/lib/{utils/functions/getEOAWallet/getEOAWallet.js → views/SyncWalletView/AutoReconnectingView/AutoReconnectingView.js} +57 -50
- package/src/lib/views/SyncWalletView/AutoReconnectingView/index.d.ts +1 -0
- package/src/lib/views/SyncWalletView/ReconnectWithQrCodeView/ReconnectWithQrCodeView.cjs +126 -0
- package/src/lib/views/SyncWalletView/ReconnectWithQrCodeView/ReconnectWithQrCodeView.d.ts +9 -0
- package/src/lib/views/SyncWalletView/ReconnectWithQrCodeView/ReconnectWithQrCodeView.js +122 -0
- package/src/lib/views/SyncWalletView/ReconnectWithQrCodeView/index.d.ts +1 -0
- package/src/lib/views/SyncWalletView/SwitchWalletView/SwitchWalletView.cjs +101 -0
- package/src/lib/views/SyncWalletView/SwitchWalletView/SwitchWalletView.d.ts +10 -0
- package/src/lib/views/SyncWalletView/SwitchWalletView/SwitchWalletView.js +97 -0
- package/src/lib/views/SyncWalletView/SwitchWalletView/index.d.ts +1 -0
- package/src/lib/views/SyncWalletView/SyncWalletView.cjs +74 -49
- package/src/lib/views/SyncWalletView/SyncWalletView.d.ts +2 -0
- package/src/lib/views/SyncWalletView/SyncWalletView.js +75 -50
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +4 -2
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.d.ts +0 -2
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +4 -2
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.cjs +1 -1
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.js +1 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +1 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +1 -1
- package/src/lib/views/WalletGroupView/WalletGroupView.cjs +2 -2
- package/src/lib/views/WalletGroupView/WalletGroupView.js +2 -2
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +2 -2
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.js +2 -2
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +1 -1
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +1 -1
- package/src/lib/views/WalletList/WalletListGridTabs/WalletListGridTabs.cjs +1 -1
- package/src/lib/views/WalletList/WalletListGridTabs/WalletListGridTabs.js +1 -1
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +2 -2
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +2 -2
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +1 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.js +1 -1
- package/src/lib/views/WalletRedirectView/WalletRedirectView.cjs +1 -1
- package/src/lib/views/WalletRedirectView/WalletRedirectView.js +1 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +2 -2
- package/src/lib/views/WalletUsedView/WalletUsedView.js +2 -2
- package/src/lib/views/viewToComponentMap.cjs +1 -1
- package/src/lib/views/viewToComponentMap.js +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.js +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +1 -1
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.cjs +1 -1
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.js +1 -1
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.cjs +1 -1
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.js +1 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +8 -7
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +8 -7
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/TokenBalanceItem/TokenBalanceItem.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/TokenBalanceItem/TokenBalanceItem.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/TokenBalanceList/TokenBalanceList.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/TokenBalanceList/TokenBalanceList.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +2 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +1 -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/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/PromptModal/PromptModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/PromptModal/PromptModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/UnknownWalletInformation/UnknownWalletInformation.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/UnknownWalletInformation/UnknownWalletInformation.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithNetwork/WalletIconWithNetwork.cjs +8 -5
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithNetwork/WalletIconWithNetwork.d.ts +3 -2
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithNetwork/WalletIconWithNetwork.js +8 -5
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.d.ts +3 -1
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +2 -2
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +3 -3
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +3 -3
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +8 -10
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +8 -10
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/UserDeviceTile.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/UserDeviceTile.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +46 -45
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +47 -46
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +1 -1
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +1 -1
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +1 -1
- package/src/lib/utils/functions/createOwnerWallet/createOwnerWallet.cjs +0 -40
- package/src/lib/utils/functions/createOwnerWallet/createOwnerWallet.d.ts +0 -3
- package/src/lib/utils/functions/createOwnerWallet/createOwnerWallet.js +0 -36
- package/src/lib/utils/functions/createOwnerWallet/index.d.ts +0 -1
- package/src/lib/utils/functions/getEOAWallet/getEOAWallet.d.ts +0 -3
- package/src/lib/utils/functions/getEOAWallet/index.d.ts +0 -1
- package/src/lib/utils/functions/getWalletIdentifier/getWalletIdentifier.cjs +0 -8
- package/src/lib/utils/functions/getWalletIdentifier/getWalletIdentifier.js +0 -4
- package/src/lib/utils/functions/isWalletConnected/isWalletConnected.cjs +0 -14
- package/src/lib/utils/functions/isWalletConnected/isWalletConnected.js +0 -10
- package/src/lib/utils/hooks/events/useWindowEvent/useWindowEvent.cjs +0 -25
- package/src/lib/utils/hooks/events/useWindowEvent/useWindowEvent.js +0 -21
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/index.d.ts +0 -1
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +0 -209
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +0 -1
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +0 -205
- package/src/lib/utils/hooks/useWalletConnectors/utils/findWallet/findWallet.d.ts +0 -3
- package/src/lib/utils/hooks/useWalletConnectors/utils/findWallet/index.d.ts +0 -1
- package/src/lib/utils/hooks/useWalletsConnectionState/index.d.ts +0 -1
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.cjs +0 -184
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.d.ts +0 -12
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.js +0 -180
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var reactI18next = require('react-i18next');
|
|
8
|
+
var walletBook = require('@dynamic-labs/wallet-book');
|
|
9
|
+
var DefaultPromptModal = require('../../../widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs');
|
|
10
|
+
require('@dynamic-labs/sdk-api-core');
|
|
11
|
+
require('../../../shared/logger.cjs');
|
|
12
|
+
require('@dynamic-labs/iconic');
|
|
13
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
14
|
+
require('../../../context/ViewContext/ViewContext.cjs');
|
|
15
|
+
require('react');
|
|
16
|
+
var arrowCircleRight = require('../../../shared/assets/arrow-circle-right.cjs');
|
|
17
|
+
var shortenWalletAddress = require('../../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
|
|
18
|
+
require('../../../utils/constants/colors.cjs');
|
|
19
|
+
require('../../../utils/constants/values.cjs');
|
|
20
|
+
require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
21
|
+
require('../../../shared/utils/classes/storage/sessionStorage.cjs');
|
|
22
|
+
require('@dynamic-labs/utils');
|
|
23
|
+
require('../../../shared/consts/index.cjs');
|
|
24
|
+
require('../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
25
|
+
require('../../../components/Alert/Alert.cjs');
|
|
26
|
+
require('../../../events/dynamicEvents.cjs');
|
|
27
|
+
require('../../../../../_virtual/_tslib.cjs');
|
|
28
|
+
require('../../../context/DynamicContext/DynamicContext.cjs');
|
|
29
|
+
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
30
|
+
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
31
|
+
require('@dynamic-labs/multi-wallet');
|
|
32
|
+
require('react-international-phone');
|
|
33
|
+
require('../../../config/ApiEndpoint.cjs');
|
|
34
|
+
require('@dynamic-labs/store');
|
|
35
|
+
require('../../../locale/locale.cjs');
|
|
36
|
+
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
37
|
+
require('../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
38
|
+
require('../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
39
|
+
require('../../../context/VerificationContext/VerificationContext.cjs');
|
|
40
|
+
require('react-dom');
|
|
41
|
+
require('../../../context/WalletContext/WalletContext.cjs');
|
|
42
|
+
require('../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
|
|
43
|
+
require('../../../context/ThemeContext/ThemeContext.cjs');
|
|
44
|
+
require('../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
|
|
45
|
+
require('@dynamic-labs/types');
|
|
46
|
+
require('../../../context/LoadingContext/LoadingContext.cjs');
|
|
47
|
+
require('yup');
|
|
48
|
+
require('../../../context/MockContext/MockContext.cjs');
|
|
49
|
+
require('../../CollectUserDataView/useFields.cjs');
|
|
50
|
+
require('../../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
51
|
+
require('../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
52
|
+
require('@dynamic-labs/rpc-providers');
|
|
53
|
+
var Typography = require('../../../components/Typography/Typography.cjs');
|
|
54
|
+
require('../../../context/FooterAnimationContext/index.cjs');
|
|
55
|
+
require('../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
56
|
+
require('../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
57
|
+
require('../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
58
|
+
require('../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
59
|
+
require('../../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
60
|
+
require('../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
61
|
+
require('../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
62
|
+
require('../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
63
|
+
require('react-focus-lock');
|
|
64
|
+
var Divider = require('../../../components/Divider/Divider.cjs');
|
|
65
|
+
require('../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
66
|
+
require('../../../components/IconButton/IconButton.cjs');
|
|
67
|
+
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
68
|
+
require('formik');
|
|
69
|
+
require('@dynamic-labs/ethereum-core');
|
|
70
|
+
require('../../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
71
|
+
require('../../../components/Input/Input.cjs');
|
|
72
|
+
require('../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
73
|
+
require('../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
74
|
+
require('../../../../polyfills.cjs');
|
|
75
|
+
require('../../../context/ErrorBoundary/ErrorBoundaryBase.cjs');
|
|
76
|
+
require('../../../context/ErrorBoundary/ErrorBoundaryContext.cjs');
|
|
77
|
+
require('../../../widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.cjs');
|
|
78
|
+
require('../../../widgets/DynamicWidget/components/DynamicWidgetCard/DynamicWidgetCard.cjs');
|
|
79
|
+
require('../../../components/IsBrowser/IsBrowser.cjs');
|
|
80
|
+
require('../../../context/WidgetRegistry/WidgetRegistryContextProvider.cjs');
|
|
81
|
+
require('../../../context/FundingContext/FundingContext.cjs');
|
|
82
|
+
require('../../../components/Popper/Popper/Popper.cjs');
|
|
83
|
+
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
84
|
+
require('../../WalletList/WalletList.cjs');
|
|
85
|
+
require('../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
86
|
+
require('@hcaptcha/react-hcaptcha');
|
|
87
|
+
require('../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
88
|
+
require('../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
89
|
+
require('../../../context/SendBalanceContext/SendBalanceContext.cjs');
|
|
90
|
+
require('../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
91
|
+
require('../../../context/ConnectWithOtpContext/constants.cjs');
|
|
92
|
+
require('../../../context/ReinitializeContext/ReinitializeContextProvider.cjs');
|
|
93
|
+
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
94
|
+
require('qrcode');
|
|
95
|
+
|
|
96
|
+
const SwitchWalletView = ({ onCancel, connector, expectedAddress, activeAddress, }) => {
|
|
97
|
+
const { t } = reactI18next.useTranslation();
|
|
98
|
+
return (jsxRuntime.jsx(DefaultPromptModal.DefaultPromptModal, { dataTestId: 'switch-wallet', className: 'switch-wallet', icon: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: connector.key }), title: t('dyn_sync_wallet.switch_wallet.title'), onClose: onCancel, children: jsxRuntime.jsxs("div", { className: 'switch-wallet__body', children: [activeAddress && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_mini', color: 'secondary', weight: 'regular', copykey: 'dyn_sync_wallet.switch_wallet.active_address.heading', children: t('dyn_sync_wallet.switch_wallet.active_address.heading') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', weight: 'regular', children: shortenWalletAddress.shortenWalletAddress(activeAddress, 3, 3) }), jsxRuntime.jsx(Divider.Divider, { className: 'switch-wallet__body__divider', children: jsxRuntime.jsx(arrowCircleRight.ReactComponent, {}) })] })), jsxRuntime.jsx(Typography.Typography, { variant: 'body_mini', color: 'secondary', weight: 'regular', copykey: 'dyn_sync_wallet.switch_wallet.expected_address.heading', children: t('dyn_sync_wallet.switch_wallet.expected_address.heading') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', weight: 'regular', copykey: 'dyn_sync_wallet.switch_wallet.expected_address.prompt', className: 'switch-wallet__body__expected-address__prompt', children: t('dyn_sync_wallet.switch_wallet.expected_address.prompt') }), jsxRuntime.jsx(Typography.Typography, { color: 'green-1', weight: 'bold', className: 'switch-wallet__body__expected-address__address', children: shortenWalletAddress.shortenWalletAddress(expectedAddress, 3, 3) })] }) }));
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
exports.SwitchWalletView = SwitchWalletView;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { WalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
3
|
+
export type SwitchWalletViewProps = {
|
|
4
|
+
onCancel: () => void;
|
|
5
|
+
onTryToReconnect: () => void;
|
|
6
|
+
connector: WalletConnector;
|
|
7
|
+
expectedAddress: string;
|
|
8
|
+
activeAddress?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const SwitchWalletView: FC<SwitchWalletViewProps>;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { WalletIcon } from '@dynamic-labs/wallet-book';
|
|
5
|
+
import { DefaultPromptModal } from '../../../widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js';
|
|
6
|
+
import '@dynamic-labs/sdk-api-core';
|
|
7
|
+
import '../../../shared/logger.js';
|
|
8
|
+
import '@dynamic-labs/iconic';
|
|
9
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
10
|
+
import '../../../context/ViewContext/ViewContext.js';
|
|
11
|
+
import 'react';
|
|
12
|
+
import { ReactComponent as SvgArrowCircleRight } from '../../../shared/assets/arrow-circle-right.js';
|
|
13
|
+
import { shortenWalletAddress } from '../../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
|
|
14
|
+
import '../../../utils/constants/colors.js';
|
|
15
|
+
import '../../../utils/constants/values.js';
|
|
16
|
+
import '../../../shared/utils/classes/storage/localStorage.js';
|
|
17
|
+
import '../../../shared/utils/classes/storage/sessionStorage.js';
|
|
18
|
+
import '@dynamic-labs/utils';
|
|
19
|
+
import '../../../shared/consts/index.js';
|
|
20
|
+
import '../../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
21
|
+
import '../../../components/Alert/Alert.js';
|
|
22
|
+
import '../../../events/dynamicEvents.js';
|
|
23
|
+
import '../../../../../_virtual/_tslib.js';
|
|
24
|
+
import '../../../context/DynamicContext/DynamicContext.js';
|
|
25
|
+
import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
26
|
+
import '../../../context/ErrorContext/ErrorContext.js';
|
|
27
|
+
import '@dynamic-labs/multi-wallet';
|
|
28
|
+
import 'react-international-phone';
|
|
29
|
+
import '../../../config/ApiEndpoint.js';
|
|
30
|
+
import '@dynamic-labs/store';
|
|
31
|
+
import '../../../locale/locale.js';
|
|
32
|
+
import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
33
|
+
import '../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
34
|
+
import '../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
35
|
+
import '../../../context/VerificationContext/VerificationContext.js';
|
|
36
|
+
import 'react-dom';
|
|
37
|
+
import '../../../context/WalletContext/WalletContext.js';
|
|
38
|
+
import '../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
|
|
39
|
+
import '../../../context/ThemeContext/ThemeContext.js';
|
|
40
|
+
import '../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
|
|
41
|
+
import '@dynamic-labs/types';
|
|
42
|
+
import '../../../context/LoadingContext/LoadingContext.js';
|
|
43
|
+
import 'yup';
|
|
44
|
+
import '../../../context/MockContext/MockContext.js';
|
|
45
|
+
import '../../CollectUserDataView/useFields.js';
|
|
46
|
+
import '../../../context/FieldsStateContext/FieldsStateContext.js';
|
|
47
|
+
import '../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
48
|
+
import '@dynamic-labs/rpc-providers';
|
|
49
|
+
import { Typography } from '../../../components/Typography/Typography.js';
|
|
50
|
+
import '../../../context/FooterAnimationContext/index.js';
|
|
51
|
+
import '../../../components/ShadowDOM/ShadowDOM.js';
|
|
52
|
+
import '../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
53
|
+
import '../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
54
|
+
import '../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
55
|
+
import '../../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.js';
|
|
56
|
+
import '../../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
57
|
+
import '../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
58
|
+
import '../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
59
|
+
import 'react-focus-lock';
|
|
60
|
+
import { Divider } from '../../../components/Divider/Divider.js';
|
|
61
|
+
import '../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
62
|
+
import '../../../components/IconButton/IconButton.js';
|
|
63
|
+
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
64
|
+
import 'formik';
|
|
65
|
+
import '@dynamic-labs/ethereum-core';
|
|
66
|
+
import '../../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
67
|
+
import '../../../components/Input/Input.js';
|
|
68
|
+
import '../../../context/PasskeyContext/PasskeyContext.js';
|
|
69
|
+
import '../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
70
|
+
import '../../../../polyfills.js';
|
|
71
|
+
import '../../../context/ErrorBoundary/ErrorBoundaryBase.js';
|
|
72
|
+
import '../../../context/ErrorBoundary/ErrorBoundaryContext.js';
|
|
73
|
+
import '../../../widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.js';
|
|
74
|
+
import '../../../widgets/DynamicWidget/components/DynamicWidgetCard/DynamicWidgetCard.js';
|
|
75
|
+
import '../../../components/IsBrowser/IsBrowser.js';
|
|
76
|
+
import '../../../context/WidgetRegistry/WidgetRegistryContextProvider.js';
|
|
77
|
+
import '../../../context/FundingContext/FundingContext.js';
|
|
78
|
+
import '../../../components/Popper/Popper/Popper.js';
|
|
79
|
+
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
80
|
+
import '../../WalletList/WalletList.js';
|
|
81
|
+
import '../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
82
|
+
import '@hcaptcha/react-hcaptcha';
|
|
83
|
+
import '../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
84
|
+
import '../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
85
|
+
import '../../../context/SendBalanceContext/SendBalanceContext.js';
|
|
86
|
+
import '../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
87
|
+
import '../../../context/ConnectWithOtpContext/constants.js';
|
|
88
|
+
import '../../../context/ReinitializeContext/ReinitializeContextProvider.js';
|
|
89
|
+
import '../../../components/InlineWidget/InlineWidget.js';
|
|
90
|
+
import 'qrcode';
|
|
91
|
+
|
|
92
|
+
const SwitchWalletView = ({ onCancel, connector, expectedAddress, activeAddress, }) => {
|
|
93
|
+
const { t } = useTranslation();
|
|
94
|
+
return (jsx(DefaultPromptModal, { dataTestId: 'switch-wallet', className: 'switch-wallet', icon: jsx(WalletIcon, { walletKey: connector.key }), title: t('dyn_sync_wallet.switch_wallet.title'), onClose: onCancel, children: jsxs("div", { className: 'switch-wallet__body', children: [activeAddress && (jsxs(Fragment, { children: [jsx(Typography, { variant: 'body_mini', color: 'secondary', weight: 'regular', copykey: 'dyn_sync_wallet.switch_wallet.active_address.heading', children: t('dyn_sync_wallet.switch_wallet.active_address.heading') }), jsx(Typography, { variant: 'body_normal', color: 'primary', weight: 'regular', children: shortenWalletAddress(activeAddress, 3, 3) }), jsx(Divider, { className: 'switch-wallet__body__divider', children: jsx(SvgArrowCircleRight, {}) })] })), jsx(Typography, { variant: 'body_mini', color: 'secondary', weight: 'regular', copykey: 'dyn_sync_wallet.switch_wallet.expected_address.heading', children: t('dyn_sync_wallet.switch_wallet.expected_address.heading') }), jsx(Typography, { variant: 'body_normal', color: 'primary', weight: 'regular', copykey: 'dyn_sync_wallet.switch_wallet.expected_address.prompt', className: 'switch-wallet__body__expected-address__prompt', children: t('dyn_sync_wallet.switch_wallet.expected_address.prompt') }), jsx(Typography, { color: 'green-1', weight: 'bold', className: 'switch-wallet__body__expected-address__address', children: shortenWalletAddress(expectedAddress, 3, 3) })] }) }));
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export { SwitchWalletView };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SwitchWalletView } from './SwitchWalletView';
|
|
@@ -3,38 +3,40 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
+
var _tslib = require('../../../../_virtual/_tslib.cjs');
|
|
6
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
var reactI18next = require('react-i18next');
|
|
8
|
-
var walletBook = require('@dynamic-labs/wallet-book');
|
|
9
8
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
10
|
-
require('
|
|
11
|
-
require('
|
|
12
|
-
require('
|
|
13
|
-
require('
|
|
14
|
-
var useWalletConnectorEvent = require('../../utils/hooks/events/useWalletConnectorEvent/useWalletConnectorEvent.cjs');
|
|
15
|
-
require('../../../../_virtual/_tslib.cjs');
|
|
16
|
-
require('@dynamic-labs/utils');
|
|
17
|
-
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
9
|
+
var utils = require('@dynamic-labs/utils');
|
|
10
|
+
require('../../../polyfills.cjs');
|
|
11
|
+
require('@dynamic-labs/multi-wallet');
|
|
12
|
+
require('@dynamic-labs/rpc-providers');
|
|
18
13
|
require('@dynamic-labs/sdk-api-core');
|
|
19
14
|
require('../../shared/logger.cjs');
|
|
20
15
|
require('@dynamic-labs/iconic');
|
|
21
16
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
22
|
-
|
|
17
|
+
require('react');
|
|
18
|
+
require('@dynamic-labs/wallet-book');
|
|
23
19
|
require('../../utils/constants/colors.cjs');
|
|
24
20
|
require('../../utils/constants/values.cjs');
|
|
25
21
|
require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
26
22
|
require('../../shared/utils/classes/storage/sessionStorage.cjs');
|
|
27
23
|
require('../../shared/consts/index.cjs');
|
|
24
|
+
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
25
|
+
require('../../context/ErrorBoundary/ErrorBoundaryBase.cjs');
|
|
26
|
+
require('../../context/ErrorBoundary/ErrorBoundaryContext.cjs');
|
|
27
|
+
var useDynamicEvents = require('../../utils/hooks/events/useDynamicEvents/useDynamicEvents.cjs');
|
|
28
|
+
var useWalletConnectorEvent = require('../../utils/hooks/events/useWalletConnectorEvent/useWalletConnectorEvent.cjs');
|
|
28
29
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
29
30
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
30
|
-
require('@dynamic-labs/multi-wallet');
|
|
31
31
|
require('react-international-phone');
|
|
32
32
|
require('../../config/ApiEndpoint.cjs');
|
|
33
33
|
require('@dynamic-labs/store');
|
|
34
34
|
require('../../locale/locale.cjs');
|
|
35
|
+
var logVerboseTroubleshootingMessage = require('../../utils/functions/logVerboseTroubleshootingMessage/logVerboseTroubleshootingMessage.cjs');
|
|
35
36
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
36
37
|
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
37
38
|
require('../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
39
|
+
require('../../events/dynamicEvents.cjs');
|
|
38
40
|
require('../../context/VerificationContext/VerificationContext.cjs');
|
|
39
41
|
require('react-dom');
|
|
40
42
|
require('../../context/WalletContext/WalletContext.cjs');
|
|
@@ -48,66 +50,89 @@ require('../../context/MockContext/MockContext.cjs');
|
|
|
48
50
|
require('../CollectUserDataView/useFields.cjs');
|
|
49
51
|
require('../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
50
52
|
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
51
|
-
require('
|
|
52
|
-
|
|
53
|
-
require('../../
|
|
53
|
+
require('react-i18next');
|
|
54
|
+
require('../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
55
|
+
require('../../components/Alert/Alert.cjs');
|
|
54
56
|
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
57
|
+
require('../../components/IconButton/IconButton.cjs');
|
|
58
|
+
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
59
|
+
require('../../components/Input/Input.cjs');
|
|
60
|
+
require('../../components/IsBrowser/IsBrowser.cjs');
|
|
61
|
+
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
55
62
|
require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
56
63
|
require('../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
57
64
|
require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
58
65
|
require('../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
66
|
+
require('../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
67
|
+
require('../../components/Popper/Popper/Popper.cjs');
|
|
68
|
+
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
69
|
+
require('react-focus-lock');
|
|
70
|
+
require('qrcode');
|
|
71
|
+
require('formik');
|
|
72
|
+
require('../WalletList/WalletList.cjs');
|
|
59
73
|
require('../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
74
|
+
require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
75
|
+
require('@hcaptcha/react-hcaptcha');
|
|
76
|
+
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
77
|
+
require('../../context/FooterAnimationContext/index.cjs');
|
|
60
78
|
require('../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
79
|
+
require('../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
80
|
+
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
81
|
+
require('@dynamic-labs/ethereum-core');
|
|
61
82
|
require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
62
|
-
require('react-focus-lock');
|
|
63
|
-
var DefaultPromptModal = require('../../widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs');
|
|
64
|
-
var Divider = require('../../components/Divider/Divider.cjs');
|
|
65
|
-
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
66
|
-
require('../../components/IconButton/IconButton.cjs');
|
|
67
|
-
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
68
|
-
require('formik');
|
|
69
83
|
require('../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
70
|
-
require('../../components/Input/Input.cjs');
|
|
71
|
-
require('@dynamic-labs/ethereum-core');
|
|
72
|
-
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
73
84
|
require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
74
|
-
require('
|
|
75
|
-
require('
|
|
76
|
-
require('
|
|
85
|
+
var SwitchWalletView = require('./SwitchWalletView/SwitchWalletView.cjs');
|
|
86
|
+
var ReconnectWithQrCodeView = require('./ReconnectWithQrCodeView/ReconnectWithQrCodeView.cjs');
|
|
87
|
+
var AutoReconnectingView = require('./AutoReconnectingView/AutoReconnectingView.cjs');
|
|
77
88
|
require('../../widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.cjs');
|
|
78
89
|
require('../../widgets/DynamicWidget/components/DynamicWidgetCard/DynamicWidgetCard.cjs');
|
|
79
|
-
require('../../components/IsBrowser/IsBrowser.cjs');
|
|
80
90
|
require('../../context/WidgetRegistry/WidgetRegistryContextProvider.cjs');
|
|
81
91
|
require('../../context/FundingContext/FundingContext.cjs');
|
|
82
|
-
require('../../components/Popper/Popper/Popper.cjs');
|
|
83
|
-
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
84
|
-
require('../WalletList/WalletList.cjs');
|
|
85
|
-
require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
86
|
-
require('@hcaptcha/react-hcaptcha');
|
|
87
|
-
require('../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
88
|
-
require('../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
89
92
|
require('../../context/SendBalanceContext/SendBalanceContext.cjs');
|
|
90
93
|
require('../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
91
94
|
require('../../context/ConnectWithOtpContext/constants.cjs');
|
|
92
95
|
require('../../context/ReinitializeContext/ReinitializeContextProvider.cjs');
|
|
93
|
-
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
94
|
-
var LogoutButton = require('../../components/LogoutButton/LogoutButton.cjs');
|
|
95
|
-
require('qrcode');
|
|
96
96
|
|
|
97
|
-
const SyncWalletView = ({ onSuccess, expectedAddress, connector, }) => {
|
|
97
|
+
const SyncWalletView = ({ onSuccess, onError, expectedAddress, activeAddress, connector, }) => {
|
|
98
|
+
const showQrCodeModal = connector.canConnectViaQrCode &&
|
|
99
|
+
!connector.isInstalledOnBrowser() &&
|
|
100
|
+
!connector.canConnectViaCustodialService;
|
|
101
|
+
logVerboseTroubleshootingMessage.logVerboseTroubleshootingMessage('[SyncWallet]', {
|
|
102
|
+
canConnectViaCustodialService: connector.canConnectViaCustodialService,
|
|
103
|
+
canConnectViaQrCode: connector.canConnectViaQrCode,
|
|
104
|
+
isEmbeddedWallet: connector.isEmbeddedWallet,
|
|
105
|
+
isInstalledOnBrowser: connector.isInstalledOnBrowser(),
|
|
106
|
+
});
|
|
98
107
|
useWalletConnectorEvent.useWalletConnectorEvent(connector, 'accountChange', ({ accounts }) => {
|
|
99
|
-
|
|
100
|
-
|
|
108
|
+
logVerboseTroubleshootingMessage.logVerboseTroubleshootingMessage('[SyncWallet] accountChange', {
|
|
109
|
+
accounts,
|
|
110
|
+
expectedAddress,
|
|
111
|
+
});
|
|
112
|
+
const [selectedAccountAddress] = accounts;
|
|
113
|
+
if (walletConnectorCore.isSameAddress(selectedAccountAddress, expectedAddress, connector.connectedChain)) {
|
|
114
|
+
onSuccess(true);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
useDynamicEvents.useInternalDynamicEvents('logout', () => onError(new Error('user logged out'), true));
|
|
118
|
+
const handleTryToReconnect = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
119
|
+
const reconnectAddress = yield connector.getAddress();
|
|
120
|
+
if (reconnectAddress &&
|
|
121
|
+
walletConnectorCore.isSameAddress(reconnectAddress, expectedAddress, connector.connectedChain)) {
|
|
101
122
|
onSuccess(true);
|
|
102
123
|
}
|
|
103
124
|
});
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
125
|
+
const handleCancel = () => {
|
|
126
|
+
logVerboseTroubleshootingMessage.logVerboseTroubleshootingMessage('[SyncWallet] handleCancel called');
|
|
127
|
+
onError(new utils.DynamicError('User cancelled', '0'), true);
|
|
128
|
+
};
|
|
129
|
+
if (connector.isEmbeddedWallet) {
|
|
130
|
+
return (jsxRuntime.jsx("div", { className: 'sync-wallet-view', "data-testid": 'sync-wallet', children: jsxRuntime.jsx(AutoReconnectingView.AutoReconnectingView, { connector: connector, expectedAddress: expectedAddress, onCancel: handleCancel, onSuccess: () => onSuccess(true) }) }));
|
|
131
|
+
}
|
|
132
|
+
if (showQrCodeModal) {
|
|
133
|
+
return (jsxRuntime.jsx("div", { className: 'sync-wallet-view', "data-testid": 'sync-wallet', children: jsxRuntime.jsx(ReconnectWithQrCodeView.ReconnectWithQrCodeView, { connector: connector, expectedAddress: expectedAddress, onCancel: handleCancel, onSuccess: () => onSuccess(true) }) }));
|
|
134
|
+
}
|
|
135
|
+
return (jsxRuntime.jsx("div", { className: 'sync-wallet-view', "data-testid": 'sync-wallet', children: jsxRuntime.jsx(SwitchWalletView.SwitchWalletView, { connector: connector, expectedAddress: expectedAddress, activeAddress: activeAddress, onCancel: handleCancel, onTryToReconnect: handleTryToReconnect }) }));
|
|
111
136
|
};
|
|
112
137
|
|
|
113
138
|
exports.SyncWalletView = SyncWalletView;
|
|
@@ -2,7 +2,9 @@ import { FC } from 'react';
|
|
|
2
2
|
import { WalletConnector } from '../../..';
|
|
3
3
|
export type SyncWalletViewProps = {
|
|
4
4
|
onSuccess: (isInSync: boolean) => void;
|
|
5
|
+
onError: (error: unknown, closePortal?: boolean) => void;
|
|
5
6
|
connector: WalletConnector;
|
|
6
7
|
expectedAddress: string;
|
|
8
|
+
activeAddress?: string;
|
|
7
9
|
};
|
|
8
10
|
export declare const SyncWalletView: FC<SyncWalletViewProps>;
|
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { WalletIcon } from '@dynamic-labs/wallet-book';
|
|
2
|
+
import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
4
|
import { isSameAddress } from '@dynamic-labs/wallet-connector-core';
|
|
6
|
-
import '
|
|
7
|
-
import '
|
|
8
|
-
import '
|
|
9
|
-
import '
|
|
10
|
-
import { useWalletConnectorEvent } from '../../utils/hooks/events/useWalletConnectorEvent/useWalletConnectorEvent.js';
|
|
11
|
-
import '../../../../_virtual/_tslib.js';
|
|
12
|
-
import '@dynamic-labs/utils';
|
|
13
|
-
import '../../context/DynamicContext/DynamicContext.js';
|
|
5
|
+
import { DynamicError } from '@dynamic-labs/utils';
|
|
6
|
+
import '../../../polyfills.js';
|
|
7
|
+
import '@dynamic-labs/multi-wallet';
|
|
8
|
+
import '@dynamic-labs/rpc-providers';
|
|
14
9
|
import '@dynamic-labs/sdk-api-core';
|
|
15
10
|
import '../../shared/logger.js';
|
|
16
11
|
import '@dynamic-labs/iconic';
|
|
17
12
|
import '../../context/ViewContext/ViewContext.js';
|
|
18
|
-
import
|
|
13
|
+
import 'react';
|
|
14
|
+
import '@dynamic-labs/wallet-book';
|
|
19
15
|
import '../../utils/constants/colors.js';
|
|
20
16
|
import '../../utils/constants/values.js';
|
|
21
17
|
import '../../shared/utils/classes/storage/localStorage.js';
|
|
22
18
|
import '../../shared/utils/classes/storage/sessionStorage.js';
|
|
23
19
|
import '../../shared/consts/index.js';
|
|
20
|
+
import '../../context/DynamicContext/DynamicContext.js';
|
|
21
|
+
import '../../context/ErrorBoundary/ErrorBoundaryBase.js';
|
|
22
|
+
import '../../context/ErrorBoundary/ErrorBoundaryContext.js';
|
|
23
|
+
import { useInternalDynamicEvents } from '../../utils/hooks/events/useDynamicEvents/useDynamicEvents.js';
|
|
24
|
+
import { useWalletConnectorEvent } from '../../utils/hooks/events/useWalletConnectorEvent/useWalletConnectorEvent.js';
|
|
24
25
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
25
26
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
26
|
-
import '@dynamic-labs/multi-wallet';
|
|
27
27
|
import 'react-international-phone';
|
|
28
28
|
import '../../config/ApiEndpoint.js';
|
|
29
29
|
import '@dynamic-labs/store';
|
|
30
30
|
import '../../locale/locale.js';
|
|
31
|
+
import { logVerboseTroubleshootingMessage } from '../../utils/functions/logVerboseTroubleshootingMessage/logVerboseTroubleshootingMessage.js';
|
|
31
32
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
32
33
|
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
33
34
|
import '../../context/UserWalletsContext/UserWalletsContext.js';
|
|
35
|
+
import '../../events/dynamicEvents.js';
|
|
34
36
|
import '../../context/VerificationContext/VerificationContext.js';
|
|
35
37
|
import 'react-dom';
|
|
36
38
|
import '../../context/WalletContext/WalletContext.js';
|
|
@@ -44,66 +46,89 @@ import '../../context/MockContext/MockContext.js';
|
|
|
44
46
|
import '../CollectUserDataView/useFields.js';
|
|
45
47
|
import '../../context/FieldsStateContext/FieldsStateContext.js';
|
|
46
48
|
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
47
|
-
import '
|
|
48
|
-
import
|
|
49
|
-
import '../../
|
|
49
|
+
import 'react-i18next';
|
|
50
|
+
import '../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
51
|
+
import '../../components/Alert/Alert.js';
|
|
50
52
|
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
53
|
+
import '../../components/IconButton/IconButton.js';
|
|
54
|
+
import '../../components/InlineWidget/InlineWidget.js';
|
|
55
|
+
import '../../components/Input/Input.js';
|
|
56
|
+
import '../../components/IsBrowser/IsBrowser.js';
|
|
57
|
+
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
51
58
|
import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
52
59
|
import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
53
60
|
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
54
61
|
import '../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.js';
|
|
62
|
+
import '../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
63
|
+
import '../../components/Popper/Popper/Popper.js';
|
|
64
|
+
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
65
|
+
import 'react-focus-lock';
|
|
66
|
+
import 'qrcode';
|
|
67
|
+
import 'formik';
|
|
68
|
+
import '../WalletList/WalletList.js';
|
|
55
69
|
import '../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
70
|
+
import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
71
|
+
import '@hcaptcha/react-hcaptcha';
|
|
72
|
+
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
73
|
+
import '../../context/FooterAnimationContext/index.js';
|
|
56
74
|
import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
75
|
+
import '../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
76
|
+
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
77
|
+
import '@dynamic-labs/ethereum-core';
|
|
57
78
|
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
58
|
-
import 'react-focus-lock';
|
|
59
|
-
import { DefaultPromptLayout } from '../../widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js';
|
|
60
|
-
import { Divider } from '../../components/Divider/Divider.js';
|
|
61
|
-
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
62
|
-
import '../../components/IconButton/IconButton.js';
|
|
63
|
-
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
64
|
-
import 'formik';
|
|
65
79
|
import '../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
66
|
-
import '../../components/Input/Input.js';
|
|
67
|
-
import '@dynamic-labs/ethereum-core';
|
|
68
|
-
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
69
80
|
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
70
|
-
import '
|
|
71
|
-
import '
|
|
72
|
-
import '
|
|
81
|
+
import { SwitchWalletView } from './SwitchWalletView/SwitchWalletView.js';
|
|
82
|
+
import { ReconnectWithQrCodeView } from './ReconnectWithQrCodeView/ReconnectWithQrCodeView.js';
|
|
83
|
+
import { AutoReconnectingView } from './AutoReconnectingView/AutoReconnectingView.js';
|
|
73
84
|
import '../../widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.js';
|
|
74
85
|
import '../../widgets/DynamicWidget/components/DynamicWidgetCard/DynamicWidgetCard.js';
|
|
75
|
-
import '../../components/IsBrowser/IsBrowser.js';
|
|
76
86
|
import '../../context/WidgetRegistry/WidgetRegistryContextProvider.js';
|
|
77
87
|
import '../../context/FundingContext/FundingContext.js';
|
|
78
|
-
import '../../components/Popper/Popper/Popper.js';
|
|
79
|
-
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
80
|
-
import '../WalletList/WalletList.js';
|
|
81
|
-
import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
82
|
-
import '@hcaptcha/react-hcaptcha';
|
|
83
|
-
import '../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
84
|
-
import '../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
85
88
|
import '../../context/SendBalanceContext/SendBalanceContext.js';
|
|
86
89
|
import '../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
87
90
|
import '../../context/ConnectWithOtpContext/constants.js';
|
|
88
91
|
import '../../context/ReinitializeContext/ReinitializeContextProvider.js';
|
|
89
|
-
import '../../components/InlineWidget/InlineWidget.js';
|
|
90
|
-
import { LogoutButton } from '../../components/LogoutButton/LogoutButton.js';
|
|
91
|
-
import 'qrcode';
|
|
92
92
|
|
|
93
|
-
const SyncWalletView = ({ onSuccess, expectedAddress, connector, }) => {
|
|
93
|
+
const SyncWalletView = ({ onSuccess, onError, expectedAddress, activeAddress, connector, }) => {
|
|
94
|
+
const showQrCodeModal = connector.canConnectViaQrCode &&
|
|
95
|
+
!connector.isInstalledOnBrowser() &&
|
|
96
|
+
!connector.canConnectViaCustodialService;
|
|
97
|
+
logVerboseTroubleshootingMessage('[SyncWallet]', {
|
|
98
|
+
canConnectViaCustodialService: connector.canConnectViaCustodialService,
|
|
99
|
+
canConnectViaQrCode: connector.canConnectViaQrCode,
|
|
100
|
+
isEmbeddedWallet: connector.isEmbeddedWallet,
|
|
101
|
+
isInstalledOnBrowser: connector.isInstalledOnBrowser(),
|
|
102
|
+
});
|
|
94
103
|
useWalletConnectorEvent(connector, 'accountChange', ({ accounts }) => {
|
|
95
|
-
|
|
96
|
-
|
|
104
|
+
logVerboseTroubleshootingMessage('[SyncWallet] accountChange', {
|
|
105
|
+
accounts,
|
|
106
|
+
expectedAddress,
|
|
107
|
+
});
|
|
108
|
+
const [selectedAccountAddress] = accounts;
|
|
109
|
+
if (isSameAddress(selectedAccountAddress, expectedAddress, connector.connectedChain)) {
|
|
110
|
+
onSuccess(true);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
useInternalDynamicEvents('logout', () => onError(new Error('user logged out'), true));
|
|
114
|
+
const handleTryToReconnect = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
115
|
+
const reconnectAddress = yield connector.getAddress();
|
|
116
|
+
if (reconnectAddress &&
|
|
117
|
+
isSameAddress(reconnectAddress, expectedAddress, connector.connectedChain)) {
|
|
97
118
|
onSuccess(true);
|
|
98
119
|
}
|
|
99
120
|
});
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
121
|
+
const handleCancel = () => {
|
|
122
|
+
logVerboseTroubleshootingMessage('[SyncWallet] handleCancel called');
|
|
123
|
+
onError(new DynamicError('User cancelled', '0'), true);
|
|
124
|
+
};
|
|
125
|
+
if (connector.isEmbeddedWallet) {
|
|
126
|
+
return (jsx("div", { className: 'sync-wallet-view', "data-testid": 'sync-wallet', children: jsx(AutoReconnectingView, { connector: connector, expectedAddress: expectedAddress, onCancel: handleCancel, onSuccess: () => onSuccess(true) }) }));
|
|
127
|
+
}
|
|
128
|
+
if (showQrCodeModal) {
|
|
129
|
+
return (jsx("div", { className: 'sync-wallet-view', "data-testid": 'sync-wallet', children: jsx(ReconnectWithQrCodeView, { connector: connector, expectedAddress: expectedAddress, onCancel: handleCancel, onSuccess: () => onSuccess(true) }) }));
|
|
130
|
+
}
|
|
131
|
+
return (jsx("div", { className: 'sync-wallet-view', "data-testid": 'sync-wallet', children: jsx(SwitchWalletView, { connector: connector, expectedAddress: expectedAddress, activeAddress: activeAddress, onCancel: handleCancel, onTryToReconnect: handleTryToReconnect }) }));
|
|
107
132
|
};
|
|
108
133
|
|
|
109
134
|
export { SyncWalletView };
|