@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
|
@@ -4,9 +4,11 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
4
4
|
import { useMemo } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { DynamicError } from '@dynamic-labs/utils';
|
|
7
|
-
import '../../../../components/
|
|
8
|
-
import '../../../../components/
|
|
9
|
-
import {
|
|
7
|
+
import { ErrorContainer } from '../../../../components/ErrorContainer/ErrorContainer.js';
|
|
8
|
+
import { NeedHelpSection } from '../../../../components/NeedHelpSection/NeedHelpSection.js';
|
|
9
|
+
import { PasskeySuccessEnum } from '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
10
|
+
import { Typography } from '../../../../components/Typography/Typography.js';
|
|
11
|
+
import { TypographyButton } from '../../../../components/TypographyButton/TypographyButton.js';
|
|
10
12
|
import '../../../../context/DynamicContext/DynamicContext.js';
|
|
11
13
|
import '@dynamic-labs/sdk-api-core';
|
|
12
14
|
import { logger } from '../../../../shared/logger.js';
|
|
@@ -20,7 +22,7 @@ import '../../../../utils/constants/values.js';
|
|
|
20
22
|
import '../../../../shared/utils/classes/storage/localStorage.js';
|
|
21
23
|
import '../../../../shared/utils/classes/storage/sessionStorage.js';
|
|
22
24
|
import '../../../../shared/consts/index.js';
|
|
23
|
-
import {
|
|
25
|
+
import { dynamicEvents } from '../../../../events/dynamicEvents.js';
|
|
24
26
|
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
25
27
|
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
26
28
|
import '@dynamic-labs/multi-wallet';
|
|
@@ -28,7 +30,6 @@ import 'react-international-phone';
|
|
|
28
30
|
import '../../../../config/ApiEndpoint.js';
|
|
29
31
|
import '@dynamic-labs/store';
|
|
30
32
|
import '../../../../locale/locale.js';
|
|
31
|
-
import { getEOAWallet } from '../../../../utils/functions/getEOAWallet/getEOAWallet.js';
|
|
32
33
|
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
33
34
|
import '../../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
34
35
|
import '../../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
@@ -37,6 +38,7 @@ import 'react-dom';
|
|
|
37
38
|
import '../../../../context/WalletContext/WalletContext.js';
|
|
38
39
|
import { useIsTurnkeyWallet } from '../../../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js';
|
|
39
40
|
import { completePasskeyRecovery } from '../../utils/passkeyRecovery/passkeyRecovery.js';
|
|
41
|
+
import { useSmartWallets } from '../../../../utils/hooks/useSmartWallets/useSmartWallets.js';
|
|
40
42
|
import '../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
|
|
41
43
|
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
42
44
|
import '../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
|
|
@@ -49,59 +51,59 @@ import '../../../CollectUserDataView/useFields.js';
|
|
|
49
51
|
import '../../../../context/FieldsStateContext/FieldsStateContext.js';
|
|
50
52
|
import '../../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
51
53
|
import '@dynamic-labs/rpc-providers';
|
|
52
|
-
import
|
|
53
|
-
import '../../../../
|
|
54
|
+
import '../../../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
55
|
+
import '../../../../components/Alert/Alert.js';
|
|
54
56
|
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
57
|
+
import '../../../../components/IconButton/IconButton.js';
|
|
58
|
+
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
59
|
+
import '../../../../components/Input/Input.js';
|
|
60
|
+
import '../../../../components/IsBrowser/IsBrowser.js';
|
|
61
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
55
62
|
import '../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
56
63
|
import '../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
57
64
|
import '../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
58
65
|
import '../../../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.js';
|
|
66
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
67
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
68
|
+
import 'react-focus-lock';
|
|
69
|
+
import 'qrcode';
|
|
70
|
+
import 'formik';
|
|
71
|
+
import '../../../WalletList/WalletList.js';
|
|
59
72
|
import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
73
|
+
import '../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
74
|
+
import '@hcaptcha/react-hcaptcha';
|
|
75
|
+
import { getProperErrorMessage } from '../../../../modals/SignMessageConfirmationModal/getProperErrorMessage.js';
|
|
76
|
+
import '../../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
77
|
+
import '../../../../context/FooterAnimationContext/index.js';
|
|
60
78
|
import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
79
|
+
import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
80
|
+
import { PasskeyDeviceIcon } from '../../PasskeyDeviceIcon/PasskeyDeviceIcon.js';
|
|
81
|
+
import '../../../../context/PasskeyContext/PasskeyContext.js';
|
|
82
|
+
import '@dynamic-labs/ethereum-core';
|
|
61
83
|
import '../../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
62
|
-
import 'react-focus-lock';
|
|
63
|
-
import '../../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
64
|
-
import '../../../../components/IconButton/IconButton.js';
|
|
65
|
-
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
66
|
-
import { ErrorContainer } from '../../../../components/ErrorContainer/ErrorContainer.js';
|
|
67
|
-
import { TypographyButton } from '../../../../components/TypographyButton/TypographyButton.js';
|
|
68
|
-
import 'formik';
|
|
69
84
|
import '../../../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
70
|
-
import '../../../../components/Input/Input.js';
|
|
71
|
-
import '@dynamic-labs/ethereum-core';
|
|
72
|
-
import '../../../../context/PasskeyContext/PasskeyContext.js';
|
|
73
85
|
import '../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
74
|
-
import { PasskeyDeviceIcon } from '../../PasskeyDeviceIcon/PasskeyDeviceIcon.js';
|
|
75
|
-
import { getProperErrorMessage } from '../../../../modals/SignMessageConfirmationModal/getProperErrorMessage.js';
|
|
76
86
|
import '../../../../../polyfills.js';
|
|
77
87
|
import '../../../../context/ErrorBoundary/ErrorBoundaryBase.js';
|
|
78
88
|
import '../../../../context/ErrorBoundary/ErrorBoundaryContext.js';
|
|
79
89
|
import '../../../../widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.js';
|
|
80
90
|
import '../../../../widgets/DynamicWidget/components/DynamicWidgetCard/DynamicWidgetCard.js';
|
|
81
|
-
import '../../../../components/IsBrowser/IsBrowser.js';
|
|
82
91
|
import '../../../../context/WidgetRegistry/WidgetRegistryContextProvider.js';
|
|
83
92
|
import '../../../../context/FundingContext/FundingContext.js';
|
|
84
|
-
import '../../../../components/Popper/Popper/Popper.js';
|
|
85
|
-
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
86
|
-
import '../../../WalletList/WalletList.js';
|
|
87
|
-
import '../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
88
|
-
import '@hcaptcha/react-hcaptcha';
|
|
89
|
-
import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
90
|
-
import { PasskeySuccessEnum } from '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
91
93
|
import '../../../../context/SendBalanceContext/SendBalanceContext.js';
|
|
92
94
|
import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
93
95
|
import '../../../../context/ConnectWithOtpContext/constants.js';
|
|
94
96
|
import '../../../../context/ReinitializeContext/ReinitializeContextProvider.js';
|
|
95
|
-
import '../../../../
|
|
96
|
-
import { NeedHelpSection } from '../../../../components/NeedHelpSection/NeedHelpSection.js';
|
|
97
|
-
import 'qrcode';
|
|
97
|
+
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.js';
|
|
98
98
|
|
|
99
99
|
const PasskeyCompleteRecovery = () => {
|
|
100
100
|
const { primaryWallet, environmentId, user, setShowAuthFlow, setPasskeySuccessPopup, } = useInternalDynamicContext();
|
|
101
101
|
const { isTurnkeyWalletWithoutAuthenticator } = useIsTurnkeyWallet();
|
|
102
|
+
const { getEOAWallet } = useSmartWallets();
|
|
102
103
|
const { t } = useTranslation();
|
|
103
104
|
const { mutate: completeRecovery, isLoading, error, } = useMutation(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
104
|
-
|
|
105
|
+
var _a;
|
|
106
|
+
const wallet = (_a = (primaryWallet && getEOAWallet(primaryWallet))) !== null && _a !== void 0 ? _a : primaryWallet;
|
|
105
107
|
const updatedUser = yield completePasskeyRecovery({
|
|
106
108
|
environmentId,
|
|
107
109
|
user,
|
|
@@ -73,10 +73,10 @@ require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
|
73
73
|
var ErrorContainer = require('../../../../components/ErrorContainer/ErrorContainer.cjs');
|
|
74
74
|
var TypographyButton = require('../../../../components/TypographyButton/TypographyButton.cjs');
|
|
75
75
|
require('formik');
|
|
76
|
+
require('@dynamic-labs/ethereum-core');
|
|
76
77
|
require('../../../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
77
78
|
var ModalHeader = require('../../../../components/ModalHeader/ModalHeader.cjs');
|
|
78
79
|
require('../../../../components/Input/Input.cjs');
|
|
79
|
-
require('@dynamic-labs/ethereum-core');
|
|
80
80
|
require('../../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
81
81
|
require('../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
82
82
|
require('../../../../../polyfills.cjs');
|
|
@@ -93,13 +93,13 @@ require('../../../WalletList/WalletList.cjs');
|
|
|
93
93
|
require('../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
94
94
|
require('@hcaptcha/react-hcaptcha');
|
|
95
95
|
require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
96
|
+
var NeedHelpSection = require('../../../../components/NeedHelpSection/NeedHelpSection.cjs');
|
|
96
97
|
require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
97
98
|
require('../../../../context/SendBalanceContext/SendBalanceContext.cjs');
|
|
98
99
|
require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
99
100
|
require('../../../../context/ConnectWithOtpContext/constants.cjs');
|
|
100
101
|
require('../../../../context/ReinitializeContext/ReinitializeContextProvider.cjs');
|
|
101
102
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
102
|
-
var NeedHelpSection = require('../../../../components/NeedHelpSection/NeedHelpSection.cjs');
|
|
103
103
|
require('qrcode');
|
|
104
104
|
|
|
105
105
|
const PasskeyInitRecovery = ({ authenticatorType, }) => {
|
|
@@ -69,10 +69,10 @@ import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
|
69
69
|
import { ErrorContainer } from '../../../../components/ErrorContainer/ErrorContainer.js';
|
|
70
70
|
import { TypographyButton } from '../../../../components/TypographyButton/TypographyButton.js';
|
|
71
71
|
import 'formik';
|
|
72
|
+
import '@dynamic-labs/ethereum-core';
|
|
72
73
|
import '../../../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
73
74
|
import { ModalHeader } from '../../../../components/ModalHeader/ModalHeader.js';
|
|
74
75
|
import '../../../../components/Input/Input.js';
|
|
75
|
-
import '@dynamic-labs/ethereum-core';
|
|
76
76
|
import '../../../../context/PasskeyContext/PasskeyContext.js';
|
|
77
77
|
import '../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
78
78
|
import '../../../../../polyfills.js';
|
|
@@ -89,13 +89,13 @@ import '../../../WalletList/WalletList.js';
|
|
|
89
89
|
import '../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
90
90
|
import '@hcaptcha/react-hcaptcha';
|
|
91
91
|
import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
92
|
+
import { NeedHelpSection } from '../../../../components/NeedHelpSection/NeedHelpSection.js';
|
|
92
93
|
import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
93
94
|
import '../../../../context/SendBalanceContext/SendBalanceContext.js';
|
|
94
95
|
import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
95
96
|
import '../../../../context/ConnectWithOtpContext/constants.js';
|
|
96
97
|
import '../../../../context/ReinitializeContext/ReinitializeContextProvider.js';
|
|
97
98
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
98
|
-
import { NeedHelpSection } from '../../../../components/NeedHelpSection/NeedHelpSection.js';
|
|
99
99
|
import 'qrcode';
|
|
100
100
|
|
|
101
101
|
const PasskeyInitRecovery = ({ authenticatorType, }) => {
|
|
@@ -67,10 +67,10 @@ require('../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
|
67
67
|
var IconButton = require('../../../components/IconButton/IconButton.cjs');
|
|
68
68
|
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
69
69
|
var TypographyButton = require('../../../components/TypographyButton/TypographyButton.cjs');
|
|
70
|
+
require('@dynamic-labs/ethereum-core');
|
|
70
71
|
require('../../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
71
72
|
var ModalHeader = require('../../../components/ModalHeader/ModalHeader.cjs');
|
|
72
73
|
var Input = require('../../../components/Input/Input.cjs');
|
|
73
|
-
require('@dynamic-labs/ethereum-core');
|
|
74
74
|
var PasskeyContext = require('../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
75
75
|
require('../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
76
76
|
require('../../../../polyfills.cjs');
|
|
@@ -63,10 +63,10 @@ import '../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
|
63
63
|
import { IconButton } from '../../../components/IconButton/IconButton.js';
|
|
64
64
|
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
65
65
|
import { TypographyButton } from '../../../components/TypographyButton/TypographyButton.js';
|
|
66
|
+
import '@dynamic-labs/ethereum-core';
|
|
66
67
|
import '../../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
67
68
|
import { ModalHeader } from '../../../components/ModalHeader/ModalHeader.js';
|
|
68
69
|
import { Input } from '../../../components/Input/Input.js';
|
|
69
|
-
import '@dynamic-labs/ethereum-core';
|
|
70
70
|
import { usePasskeyContext } from '../../../context/PasskeyContext/PasskeyContext.js';
|
|
71
71
|
import '../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
72
72
|
import '../../../../polyfills.js';
|
|
@@ -65,9 +65,9 @@ require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
|
65
65
|
require('../../components/IconButton/IconButton.cjs');
|
|
66
66
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
67
67
|
require('formik');
|
|
68
|
+
require('@dynamic-labs/ethereum-core');
|
|
68
69
|
require('../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
69
70
|
require('../../components/Input/Input.cjs');
|
|
70
|
-
require('@dynamic-labs/ethereum-core');
|
|
71
71
|
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
72
72
|
require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
73
73
|
require('../../../polyfills.cjs');
|
|
@@ -61,9 +61,9 @@ import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
|
61
61
|
import '../../components/IconButton/IconButton.js';
|
|
62
62
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
63
63
|
import 'formik';
|
|
64
|
+
import '@dynamic-labs/ethereum-core';
|
|
64
65
|
import '../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
65
66
|
import '../../components/Input/Input.js';
|
|
66
|
-
import '@dynamic-labs/ethereum-core';
|
|
67
67
|
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
68
68
|
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
69
69
|
import '../../../polyfills.js';
|
|
@@ -70,9 +70,9 @@ require('../../components/IconButton/IconButton.cjs');
|
|
|
70
70
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
71
71
|
var TypographyButton = require('../../components/TypographyButton/TypographyButton.cjs');
|
|
72
72
|
require('formik');
|
|
73
|
+
require('@dynamic-labs/ethereum-core');
|
|
73
74
|
require('../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
74
75
|
require('../../components/Input/Input.cjs');
|
|
75
|
-
require('@dynamic-labs/ethereum-core');
|
|
76
76
|
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
77
77
|
require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
78
78
|
require('../../../polyfills.cjs');
|
|
@@ -66,9 +66,9 @@ import '../../components/IconButton/IconButton.js';
|
|
|
66
66
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
67
67
|
import { TypographyButton } from '../../components/TypographyButton/TypographyButton.js';
|
|
68
68
|
import 'formik';
|
|
69
|
+
import '@dynamic-labs/ethereum-core';
|
|
69
70
|
import '../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
70
71
|
import '../../components/Input/Input.js';
|
|
71
|
-
import '@dynamic-labs/ethereum-core';
|
|
72
72
|
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
73
73
|
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
74
74
|
import '../../../polyfills.js';
|
|
@@ -63,9 +63,9 @@ require('../../components/IconButton/IconButton.cjs');
|
|
|
63
63
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
64
64
|
var TypographyButton = require('../../components/TypographyButton/TypographyButton.cjs');
|
|
65
65
|
require('formik');
|
|
66
|
+
require('@dynamic-labs/ethereum-core');
|
|
66
67
|
require('../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
67
68
|
require('../../components/Input/Input.cjs');
|
|
68
|
-
require('@dynamic-labs/ethereum-core');
|
|
69
69
|
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
70
70
|
require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
71
71
|
require('../../../polyfills.cjs');
|
|
@@ -59,9 +59,9 @@ import '../../components/IconButton/IconButton.js';
|
|
|
59
59
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
60
60
|
import { TypographyButton } from '../../components/TypographyButton/TypographyButton.js';
|
|
61
61
|
import 'formik';
|
|
62
|
+
import '@dynamic-labs/ethereum-core';
|
|
62
63
|
import '../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
63
64
|
import '../../components/Input/Input.js';
|
|
64
|
-
import '@dynamic-labs/ethereum-core';
|
|
65
65
|
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
66
66
|
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
67
67
|
import '../../../polyfills.js';
|
|
@@ -66,9 +66,9 @@ require('../../components/IconButton/IconButton.cjs');
|
|
|
66
66
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
67
67
|
var TypographyButton = require('../../components/TypographyButton/TypographyButton.cjs');
|
|
68
68
|
require('formik');
|
|
69
|
+
require('@dynamic-labs/ethereum-core');
|
|
69
70
|
require('../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
70
71
|
require('../../components/Input/Input.cjs');
|
|
71
|
-
require('@dynamic-labs/ethereum-core');
|
|
72
72
|
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
73
73
|
require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
74
74
|
require('../../../polyfills.cjs');
|
|
@@ -62,9 +62,9 @@ import '../../components/IconButton/IconButton.js';
|
|
|
62
62
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
63
63
|
import { TypographyButton } from '../../components/TypographyButton/TypographyButton.js';
|
|
64
64
|
import 'formik';
|
|
65
|
+
import '@dynamic-labs/ethereum-core';
|
|
65
66
|
import '../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
66
67
|
import '../../components/Input/Input.js';
|
|
67
|
-
import '@dynamic-labs/ethereum-core';
|
|
68
68
|
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
69
69
|
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
70
70
|
import '../../../polyfills.js';
|
|
@@ -7,11 +7,12 @@ var _tslib = require('../../../../_virtual/_tslib.cjs');
|
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var React = require('react');
|
|
9
9
|
var reactI18next = require('react-i18next');
|
|
10
|
-
var utils = require('@dynamic-labs/utils');
|
|
11
10
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
11
|
+
var utils = require('@dynamic-labs/utils');
|
|
12
12
|
var sdkApiCore = require('@dynamic-labs/sdk-api-core');
|
|
13
|
+
var ethereumCore = require('@dynamic-labs/ethereum-core');
|
|
13
14
|
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
14
|
-
require('../../shared/logger.cjs');
|
|
15
|
+
var logger = require('../../shared/logger.cjs');
|
|
15
16
|
require('@dynamic-labs/iconic');
|
|
16
17
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
17
18
|
require('@dynamic-labs/wallet-book');
|
|
@@ -29,6 +30,8 @@ require('react-international-phone');
|
|
|
29
30
|
require('../../config/ApiEndpoint.cjs');
|
|
30
31
|
require('@dynamic-labs/store');
|
|
31
32
|
require('../../locale/locale.cjs');
|
|
33
|
+
var sendBalanceActions = require('../../store/actions/sendBalanceActions/sendBalanceActions.cjs');
|
|
34
|
+
var useSendBalanceState = require('../../store/hooks/useSendBalanceState/useSendBalanceState.cjs');
|
|
32
35
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
33
36
|
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
34
37
|
require('../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
@@ -115,15 +118,10 @@ const SendBalanceView = ({ initialRecipientAddress = '', initialValue, onClickBa
|
|
|
115
118
|
const [isNativeToken, setIsNativeToken] = React.useState(false);
|
|
116
119
|
const [currentToken, setCurrentToken] = React.useState(undefined);
|
|
117
120
|
const [tokenBalances, setTokenBalances] = React.useState(undefined);
|
|
118
|
-
const [nativePrice, setNativePrice] = React.useState(0);
|
|
119
121
|
const { showFiat } = useInternalDynamicContext.useInternalDynamicContext();
|
|
120
122
|
const walletConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
|
|
121
123
|
const { chain } = useFetchChain.useFetchChain(walletConnector);
|
|
122
|
-
|
|
123
|
-
if (walletConnector && 'activeChain' in walletConnector) {
|
|
124
|
-
activeChainName = walletConnector.activeChain.name;
|
|
125
|
-
}
|
|
126
|
-
const chainName = activeChainName || (chain === null || chain === void 0 ? void 0 : chain.name) || (walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.connectedChain) || '';
|
|
124
|
+
const { chainName } = useSendBalanceState.useSendBalanceState();
|
|
127
125
|
const { tokenBalances: unorderedTokenBalances, isLoading } = useTokenBalances.useTokenBalances({
|
|
128
126
|
chainName: (walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.connectedChain) === 'SOL'
|
|
129
127
|
? sdkApiCore.ChainEnum.Sol
|
|
@@ -143,6 +141,19 @@ const SendBalanceView = ({ initialRecipientAddress = '', initialValue, onClickBa
|
|
|
143
141
|
throw new utils.DynamicError('Primary wallet is not eligible for this operation. It must implement ISendBalanceWalletConnector');
|
|
144
142
|
}
|
|
145
143
|
const [transaction, setTransaction] = React.useState(null);
|
|
144
|
+
React.useEffect(() => {
|
|
145
|
+
const evmChain = (walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.connectedChain) !== 'SOL'
|
|
146
|
+
? ethereumCore.getOrMapViemChain({
|
|
147
|
+
chainId: chain === null || chain === void 0 ? void 0 : chain.chainId,
|
|
148
|
+
}).name
|
|
149
|
+
: undefined;
|
|
150
|
+
sendBalanceActions.setSendBalance({
|
|
151
|
+
chainName: evmChain || (chain === null || chain === void 0 ? void 0 : chain.name) || (walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.connectedChain),
|
|
152
|
+
});
|
|
153
|
+
return () => {
|
|
154
|
+
sendBalanceActions.resetSendBalance();
|
|
155
|
+
};
|
|
156
|
+
}, [chain === null || chain === void 0 ? void 0 : chain.name, walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.connectedChain]);
|
|
146
157
|
React.useEffect(() => {
|
|
147
158
|
if (unorderedTokenBalances)
|
|
148
159
|
setTokenBalances(moveNativeTokenToFirstPosition(unorderedTokenBalances));
|
|
@@ -168,6 +179,12 @@ const SendBalanceView = ({ initialRecipientAddress = '', initialValue, onClickBa
|
|
|
168
179
|
setTransaction(transaction);
|
|
169
180
|
})
|
|
170
181
|
.catch((error) => {
|
|
182
|
+
logger.logger.debug('[SendBalanceView] Error creating transaction', error);
|
|
183
|
+
if (error instanceof utils.DynamicError && error.code === '0') {
|
|
184
|
+
// means user cancelled the request for sync'ing the wallet
|
|
185
|
+
onDone === null || onDone === void 0 ? void 0 : onDone();
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
171
188
|
onError === null || onError === void 0 ? void 0 : onError(error);
|
|
172
189
|
});
|
|
173
190
|
}, [currentToken]);
|
|
@@ -192,7 +209,7 @@ const SendBalanceView = ({ initialRecipientAddress = '', initialValue, onClickBa
|
|
|
192
209
|
const currencyIcon = chain && (jsxRuntime.jsx(ChainIcon.ChainIcon, { chain: chain, chainName: chainName }));
|
|
193
210
|
const buildFormStage = () => (jsxRuntime.jsx(SendBalancePageLayout.SendBalancePageLayout, { transaction: transaction, onClickBack: onClickBack, networkName: networkData.vanityName || networkData.name, networkIcon: currencyIcon, networkCurrencyDecimals: networkData.nativeCurrency.symbol === 'SOL'
|
|
194
211
|
? 9
|
|
195
|
-
: networkData.nativeCurrency.decimals, walletAddress: shortenWalletAddress.shortenWalletAddress(currentToken === null || currentToken === void 0 ? void 0 : currentToken.address, 3, 3), walletKey: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.key, onClickClose: onClickClose, displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, onSubmit: () => setStage('confirmation'), tokenBalances: tokenBalances !== null && tokenBalances !== void 0 ? tokenBalances : (currentToken && [currentToken]), currentToken: currentToken, setCurrentToken: setCurrentToken, isLoading: isLoading, isNativeToken: isNativeToken
|
|
212
|
+
: networkData.nativeCurrency.decimals, walletAddress: shortenWalletAddress.shortenWalletAddress(currentToken === null || currentToken === void 0 ? void 0 : currentToken.address, 3, 3), walletKey: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.key, onClickClose: onClickClose, displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, onSubmit: () => setStage('confirmation'), tokenBalances: tokenBalances !== null && tokenBalances !== void 0 ? tokenBalances : (currentToken && [currentToken]), currentToken: currentToken, setCurrentToken: setCurrentToken, isLoading: isLoading, isNativeToken: isNativeToken }));
|
|
196
213
|
const buildTransactionStage = () => (jsxRuntime.jsx(TransactionConfirmationView.TransactionConfirmationView, { walletConnector: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector, transaction: transaction, mutation: () => {
|
|
197
214
|
walletUiUtils.disabledConfirmationOnce();
|
|
198
215
|
return transaction.submit();
|
|
@@ -202,10 +219,10 @@ const SendBalanceView = ({ initialRecipientAddress = '', initialValue, onClickBa
|
|
|
202
219
|
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(txHash);
|
|
203
220
|
setStage('success');
|
|
204
221
|
handleSuccessToRefreshBalance(txHash);
|
|
205
|
-
}), currentToken: currentToken, isNativeToken: isNativeToken, transactionValue: getTransactionValue(transaction, isNativeToken)
|
|
222
|
+
}), currentToken: currentToken, isNativeToken: isNativeToken, transactionValue: getTransactionValue(transaction, isNativeToken) }));
|
|
206
223
|
const buildSuccessState = () => {
|
|
207
224
|
var _a;
|
|
208
|
-
return (jsxRuntime.jsx(TransactionStatusLayout.TransactionStatusLayout, { transactionValue: getTransactionValue(transaction, isNativeToken), destinationAddress: (_a = transaction.to) !== null && _a !== void 0 ? _a : '', networkCurrency: networkCurrency, networkName: chainName || '', NetworkIcon: currencyIcon, onClickClose: onClickClose, onDone: () => onDone === null || onDone === void 0 ? void 0 : onDone(), displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, transaction: transaction, currentToken: currentToken,
|
|
225
|
+
return (jsxRuntime.jsx(TransactionStatusLayout.TransactionStatusLayout, { transactionValue: getTransactionValue(transaction, isNativeToken), destinationAddress: (_a = transaction.to) !== null && _a !== void 0 ? _a : '', networkCurrency: networkCurrency, networkName: chainName || '', NetworkIcon: currencyIcon, onClickClose: onClickClose, onDone: () => onDone === null || onDone === void 0 ? void 0 : onDone(), displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, transaction: transaction, currentToken: currentToken, isNativeToken: isNativeToken }));
|
|
209
226
|
};
|
|
210
227
|
const getCurrentView = () => {
|
|
211
228
|
switch (stage) {
|
|
@@ -3,11 +3,12 @@ import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { useState, useEffect } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { DynamicError } from '@dynamic-labs/utils';
|
|
7
6
|
import { isSendBalanceWalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
7
|
+
import { DynamicError } from '@dynamic-labs/utils';
|
|
8
8
|
import { ChainEnum } from '@dynamic-labs/sdk-api-core';
|
|
9
|
+
import { getOrMapViemChain } from '@dynamic-labs/ethereum-core';
|
|
9
10
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
10
|
-
import '../../shared/logger.js';
|
|
11
|
+
import { logger } from '../../shared/logger.js';
|
|
11
12
|
import '@dynamic-labs/iconic';
|
|
12
13
|
import '../../context/ViewContext/ViewContext.js';
|
|
13
14
|
import '@dynamic-labs/wallet-book';
|
|
@@ -25,6 +26,8 @@ import 'react-international-phone';
|
|
|
25
26
|
import '../../config/ApiEndpoint.js';
|
|
26
27
|
import '@dynamic-labs/store';
|
|
27
28
|
import '../../locale/locale.js';
|
|
29
|
+
import { setSendBalance, resetSendBalance } from '../../store/actions/sendBalanceActions/sendBalanceActions.js';
|
|
30
|
+
import { useSendBalanceState } from '../../store/hooks/useSendBalanceState/useSendBalanceState.js';
|
|
28
31
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
29
32
|
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
30
33
|
import '../../context/UserWalletsContext/UserWalletsContext.js';
|
|
@@ -111,15 +114,10 @@ const SendBalanceView = ({ initialRecipientAddress = '', initialValue, onClickBa
|
|
|
111
114
|
const [isNativeToken, setIsNativeToken] = useState(false);
|
|
112
115
|
const [currentToken, setCurrentToken] = useState(undefined);
|
|
113
116
|
const [tokenBalances, setTokenBalances] = useState(undefined);
|
|
114
|
-
const [nativePrice, setNativePrice] = useState(0);
|
|
115
117
|
const { showFiat } = useInternalDynamicContext();
|
|
116
118
|
const walletConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
|
|
117
119
|
const { chain } = useFetchChain(walletConnector);
|
|
118
|
-
|
|
119
|
-
if (walletConnector && 'activeChain' in walletConnector) {
|
|
120
|
-
activeChainName = walletConnector.activeChain.name;
|
|
121
|
-
}
|
|
122
|
-
const chainName = activeChainName || (chain === null || chain === void 0 ? void 0 : chain.name) || (walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.connectedChain) || '';
|
|
120
|
+
const { chainName } = useSendBalanceState();
|
|
123
121
|
const { tokenBalances: unorderedTokenBalances, isLoading } = useTokenBalances({
|
|
124
122
|
chainName: (walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.connectedChain) === 'SOL'
|
|
125
123
|
? ChainEnum.Sol
|
|
@@ -139,6 +137,19 @@ const SendBalanceView = ({ initialRecipientAddress = '', initialValue, onClickBa
|
|
|
139
137
|
throw new DynamicError('Primary wallet is not eligible for this operation. It must implement ISendBalanceWalletConnector');
|
|
140
138
|
}
|
|
141
139
|
const [transaction, setTransaction] = useState(null);
|
|
140
|
+
useEffect(() => {
|
|
141
|
+
const evmChain = (walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.connectedChain) !== 'SOL'
|
|
142
|
+
? getOrMapViemChain({
|
|
143
|
+
chainId: chain === null || chain === void 0 ? void 0 : chain.chainId,
|
|
144
|
+
}).name
|
|
145
|
+
: undefined;
|
|
146
|
+
setSendBalance({
|
|
147
|
+
chainName: evmChain || (chain === null || chain === void 0 ? void 0 : chain.name) || (walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.connectedChain),
|
|
148
|
+
});
|
|
149
|
+
return () => {
|
|
150
|
+
resetSendBalance();
|
|
151
|
+
};
|
|
152
|
+
}, [chain === null || chain === void 0 ? void 0 : chain.name, walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.connectedChain]);
|
|
142
153
|
useEffect(() => {
|
|
143
154
|
if (unorderedTokenBalances)
|
|
144
155
|
setTokenBalances(moveNativeTokenToFirstPosition(unorderedTokenBalances));
|
|
@@ -164,6 +175,12 @@ const SendBalanceView = ({ initialRecipientAddress = '', initialValue, onClickBa
|
|
|
164
175
|
setTransaction(transaction);
|
|
165
176
|
})
|
|
166
177
|
.catch((error) => {
|
|
178
|
+
logger.debug('[SendBalanceView] Error creating transaction', error);
|
|
179
|
+
if (error instanceof DynamicError && error.code === '0') {
|
|
180
|
+
// means user cancelled the request for sync'ing the wallet
|
|
181
|
+
onDone === null || onDone === void 0 ? void 0 : onDone();
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
167
184
|
onError === null || onError === void 0 ? void 0 : onError(error);
|
|
168
185
|
});
|
|
169
186
|
}, [currentToken]);
|
|
@@ -188,7 +205,7 @@ const SendBalanceView = ({ initialRecipientAddress = '', initialValue, onClickBa
|
|
|
188
205
|
const currencyIcon = chain && (jsx(ChainIcon, { chain: chain, chainName: chainName }));
|
|
189
206
|
const buildFormStage = () => (jsx(SendBalancePageLayout, { transaction: transaction, onClickBack: onClickBack, networkName: networkData.vanityName || networkData.name, networkIcon: currencyIcon, networkCurrencyDecimals: networkData.nativeCurrency.symbol === 'SOL'
|
|
190
207
|
? 9
|
|
191
|
-
: networkData.nativeCurrency.decimals, walletAddress: shortenWalletAddress(currentToken === null || currentToken === void 0 ? void 0 : currentToken.address, 3, 3), walletKey: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.key, onClickClose: onClickClose, displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, onSubmit: () => setStage('confirmation'), tokenBalances: tokenBalances !== null && tokenBalances !== void 0 ? tokenBalances : (currentToken && [currentToken]), currentToken: currentToken, setCurrentToken: setCurrentToken, isLoading: isLoading, isNativeToken: isNativeToken
|
|
208
|
+
: networkData.nativeCurrency.decimals, walletAddress: shortenWalletAddress(currentToken === null || currentToken === void 0 ? void 0 : currentToken.address, 3, 3), walletKey: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.key, onClickClose: onClickClose, displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, onSubmit: () => setStage('confirmation'), tokenBalances: tokenBalances !== null && tokenBalances !== void 0 ? tokenBalances : (currentToken && [currentToken]), currentToken: currentToken, setCurrentToken: setCurrentToken, isLoading: isLoading, isNativeToken: isNativeToken }));
|
|
192
209
|
const buildTransactionStage = () => (jsx(TransactionConfirmationView, { walletConnector: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector, transaction: transaction, mutation: () => {
|
|
193
210
|
walletUiUtils.disabledConfirmationOnce();
|
|
194
211
|
return transaction.submit();
|
|
@@ -198,10 +215,10 @@ const SendBalanceView = ({ initialRecipientAddress = '', initialValue, onClickBa
|
|
|
198
215
|
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(txHash);
|
|
199
216
|
setStage('success');
|
|
200
217
|
handleSuccessToRefreshBalance(txHash);
|
|
201
|
-
}), currentToken: currentToken, isNativeToken: isNativeToken, transactionValue: getTransactionValue(transaction, isNativeToken)
|
|
218
|
+
}), currentToken: currentToken, isNativeToken: isNativeToken, transactionValue: getTransactionValue(transaction, isNativeToken) }));
|
|
202
219
|
const buildSuccessState = () => {
|
|
203
220
|
var _a;
|
|
204
|
-
return (jsx(TransactionStatusLayout, { transactionValue: getTransactionValue(transaction, isNativeToken), destinationAddress: (_a = transaction.to) !== null && _a !== void 0 ? _a : '', networkCurrency: networkCurrency, networkName: chainName || '', NetworkIcon: currencyIcon, onClickClose: onClickClose, onDone: () => onDone === null || onDone === void 0 ? void 0 : onDone(), displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, transaction: transaction, currentToken: currentToken,
|
|
221
|
+
return (jsx(TransactionStatusLayout, { transactionValue: getTransactionValue(transaction, isNativeToken), destinationAddress: (_a = transaction.to) !== null && _a !== void 0 ? _a : '', networkCurrency: networkCurrency, networkName: chainName || '', NetworkIcon: currencyIcon, onClickClose: onClickClose, onDone: () => onDone === null || onDone === void 0 ? void 0 : onDone(), displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, transaction: transaction, currentToken: currentToken, isNativeToken: isNativeToken }));
|
|
205
222
|
};
|
|
206
223
|
const getCurrentView = () => {
|
|
207
224
|
switch (stage) {
|
|
@@ -64,9 +64,9 @@ require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
|
64
64
|
require('../../components/IconButton/IconButton.cjs');
|
|
65
65
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
66
66
|
require('formik');
|
|
67
|
+
require('@dynamic-labs/ethereum-core');
|
|
67
68
|
require('../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
68
69
|
require('../../components/Input/Input.cjs');
|
|
69
|
-
require('@dynamic-labs/ethereum-core');
|
|
70
70
|
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
71
71
|
require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
72
72
|
require('../../../polyfills.cjs');
|
|
@@ -60,9 +60,9 @@ import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
|
60
60
|
import '../../components/IconButton/IconButton.js';
|
|
61
61
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
62
62
|
import 'formik';
|
|
63
|
+
import '@dynamic-labs/ethereum-core';
|
|
63
64
|
import '../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
64
65
|
import '../../components/Input/Input.js';
|
|
65
|
-
import '@dynamic-labs/ethereum-core';
|
|
66
66
|
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
67
67
|
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
68
68
|
import '../../../polyfills.js';
|
|
@@ -66,9 +66,9 @@ require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
|
66
66
|
require('../../components/IconButton/IconButton.cjs');
|
|
67
67
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
68
68
|
require('formik');
|
|
69
|
+
require('@dynamic-labs/ethereum-core');
|
|
69
70
|
require('../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
70
71
|
require('../../components/Input/Input.cjs');
|
|
71
|
-
require('@dynamic-labs/ethereum-core');
|
|
72
72
|
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
73
73
|
require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
74
74
|
require('../../../polyfills.cjs');
|
|
@@ -62,9 +62,9 @@ import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
|
62
62
|
import '../../components/IconButton/IconButton.js';
|
|
63
63
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
64
64
|
import 'formik';
|
|
65
|
+
import '@dynamic-labs/ethereum-core';
|
|
65
66
|
import '../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
66
67
|
import '../../components/Input/Input.js';
|
|
67
|
-
import '@dynamic-labs/ethereum-core';
|
|
68
68
|
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
69
69
|
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
70
70
|
import '../../../polyfills.js';
|
|
@@ -66,9 +66,9 @@ require('../../components/IconButton/IconButton.cjs');
|
|
|
66
66
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
67
67
|
var TypographyButton = require('../../components/TypographyButton/TypographyButton.cjs');
|
|
68
68
|
require('formik');
|
|
69
|
+
require('@dynamic-labs/ethereum-core');
|
|
69
70
|
require('../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
70
71
|
require('../../components/Input/Input.cjs');
|
|
71
|
-
require('@dynamic-labs/ethereum-core');
|
|
72
72
|
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
73
73
|
require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
74
74
|
require('../../../polyfills.cjs');
|
|
@@ -62,9 +62,9 @@ import '../../components/IconButton/IconButton.js';
|
|
|
62
62
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
63
63
|
import { TypographyButton } from '../../components/TypographyButton/TypographyButton.js';
|
|
64
64
|
import 'formik';
|
|
65
|
+
import '@dynamic-labs/ethereum-core';
|
|
65
66
|
import '../TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
66
67
|
import '../../components/Input/Input.js';
|
|
67
|
-
import '@dynamic-labs/ethereum-core';
|
|
68
68
|
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
69
69
|
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
70
70
|
import '../../../polyfills.js';
|