@dynamic-labs/sdk-react-core 4.5.1 → 4.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +12 -12
- package/src/index.cjs +1 -0
- package/src/index.js +1 -0
- package/src/lib/Main.cjs +1 -0
- package/src/lib/Main.js +1 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +1 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +1 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +1 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.js +1 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +1 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +1 -0
- package/src/lib/components/Captcha/Captcha.cjs +1 -0
- package/src/lib/components/Captcha/Captcha.js +1 -0
- package/src/lib/components/Divider/Divider.cjs +1 -0
- package/src/lib/components/Divider/Divider.js +1 -0
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +1 -0
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +1 -0
- package/src/lib/components/EmailForm/EmailForm.cjs +1 -0
- package/src/lib/components/EmailForm/EmailForm.js +1 -0
- package/src/lib/components/LogoutButton/LogoutButton.cjs +1 -0
- package/src/lib/components/LogoutButton/LogoutButton.js +1 -0
- package/src/lib/components/Modal/Modal.cjs +1 -0
- package/src/lib/components/Modal/Modal.js +1 -0
- package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +1 -0
- package/src/lib/components/NeedHelpSection/NeedHelpSection.js +1 -0
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +12 -40
- package/src/lib/components/NetworkPicker/NetworkPicker.d.ts +2 -6
- package/src/lib/components/NetworkPicker/NetworkPicker.js +13 -41
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.js +1 -0
- package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.cjs +6 -8
- package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.d.ts +2 -4
- package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.js +6 -8
- package/src/lib/components/NetworkPicker/components/NetworkControlSkeleton/NetworkControlSkeleton.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/NetworkControlSkeleton/NetworkControlSkeleton.js +1 -0
- package/src/lib/components/NetworkPicker/components/NetworkDropdown/NetworkDropdown.cjs +67 -0
- package/src/lib/components/NetworkPicker/components/NetworkDropdown/NetworkDropdown.d.ts +14 -0
- package/src/lib/components/NetworkPicker/components/NetworkDropdown/NetworkDropdown.js +63 -0
- package/src/lib/components/NetworkPicker/components/NetworkDropdown/index.d.ts +1 -0
- package/src/lib/components/NetworkPicker/components/{EvmNetworkControl/EvmNetworkControl.cjs → NetworkSwitchControl/NetworkSwitchControl.cjs} +28 -36
- package/src/lib/components/NetworkPicker/components/NetworkSwitchControl/NetworkSwitchControl.d.ts +16 -0
- package/src/lib/components/NetworkPicker/components/{EvmNetworkControl/EvmNetworkControl.js → NetworkSwitchControl/NetworkSwitchControl.js} +28 -35
- package/src/lib/components/NetworkPicker/components/NetworkSwitchControl/index.d.ts +1 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +1 -0
- package/src/lib/components/OverlayCardBase/OverlayCardBase.cjs +1 -0
- package/src/lib/components/OverlayCardBase/OverlayCardBase.js +1 -0
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs +1 -0
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js +1 -0
- package/src/lib/components/PhoneNumberField/PhoneNumberField.cjs +1 -0
- package/src/lib/components/PhoneNumberField/PhoneNumberField.js +1 -0
- package/src/lib/components/Portal/Portal.cjs +4 -2
- package/src/lib/components/Portal/Portal.js +4 -2
- package/src/lib/components/PoweredByDynamic/PoweredByDynamic.cjs +1 -0
- package/src/lib/components/PoweredByDynamic/PoweredByDynamic.js +1 -0
- package/src/lib/components/QRCode/QRCode.cjs +1 -0
- package/src/lib/components/QRCode/QRCode.js +1 -0
- package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.cjs +1 -0
- package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.js +1 -0
- package/src/lib/components/QrCodeWrapper/QrCodeWrapper.cjs +1 -0
- package/src/lib/components/QrCodeWrapper/QrCodeWrapper.js +1 -0
- package/src/lib/components/RenderView/RenderView.cjs +1 -0
- package/src/lib/components/RenderView/RenderView.js +1 -0
- package/src/lib/components/RetrySendVerificationCodeSection/RetrySendVerificationCodeSection.cjs +1 -0
- package/src/lib/components/RetrySendVerificationCodeSection/RetrySendVerificationCodeSection.js +1 -0
- package/src/lib/components/SandboxIndicatorWrapper/SandboxIndicatorWrapper.cjs +1 -0
- package/src/lib/components/SandboxIndicatorWrapper/SandboxIndicatorWrapper.js +1 -0
- package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.cjs +1 -0
- package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.js +1 -0
- package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +1 -0
- package/src/lib/components/SendBalanceForm/SendBalanceForm.js +1 -0
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +1 -0
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +1 -0
- package/src/lib/components/SendBalancePageLayout/components/TokensBalanceDropdown/TokensBalanceDropdown.cjs +1 -0
- package/src/lib/components/SendBalancePageLayout/components/TokensBalanceDropdown/TokensBalanceDropdown.js +1 -0
- package/src/lib/components/ShadowDOM/ShadowDOM.cjs +1 -0
- package/src/lib/components/ShadowDOM/ShadowDOM.js +1 -0
- package/src/lib/components/SocialSignIn/SocialSignIn.cjs +1 -0
- package/src/lib/components/SocialSignIn/SocialSignIn.js +1 -0
- package/src/lib/components/SyncAuthFlow/SyncAuthFlow.cjs +1 -0
- package/src/lib/components/SyncAuthFlow/SyncAuthFlow.js +1 -0
- package/src/lib/components/Toolkit/Toolkit.cjs +1 -0
- package/src/lib/components/Toolkit/Toolkit.js +1 -0
- package/src/lib/components/Toolkit/components/LoginWithEmailSwitch.cjs +1 -0
- package/src/lib/components/Toolkit/components/LoginWithEmailSwitch.js +1 -0
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.cjs +1 -0
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.js +1 -0
- package/src/lib/components/Tooltip/Tooltip.cjs +1 -0
- package/src/lib/components/Tooltip/Tooltip.js +1 -0
- package/src/lib/components/TosAndPp/TosAndPp.cjs +1 -0
- package/src/lib/components/TosAndPp/TosAndPp.js +1 -0
- package/src/lib/components/TransactionCard/SendBalanceTransactionCard.cjs +1 -0
- package/src/lib/components/TransactionCard/SendBalanceTransactionCard.js +1 -0
- package/src/lib/components/TransactionCard/TransactionCard.cjs +1 -0
- package/src/lib/components/TransactionCard/TransactionCard.js +1 -0
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +1 -0
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +1 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +1 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +1 -0
- package/src/lib/components/UserAddress/UserAddress.cjs +1 -0
- package/src/lib/components/UserAddress/UserAddress.js +1 -0
- package/src/lib/components/UserProfile/UserProfile.cjs +1 -0
- package/src/lib/components/UserProfile/UserProfile.js +1 -0
- package/src/lib/components/UserProfile/parts/EditProfileButton/EditProfileButton.cjs +1 -0
- package/src/lib/components/UserProfile/parts/EditProfileButton/EditProfileButton.js +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +1 -0
- package/src/lib/components/UserProfileForm/UserProfileForm.cjs +1 -0
- package/src/lib/components/UserProfileForm/UserProfileForm.js +1 -0
- package/src/lib/components/WalletConnectorEvents/WalletConnectorEvents.cjs +1 -0
- package/src/lib/components/WalletConnectorEvents/WalletConnectorEvents.js +1 -0
- package/src/lib/context/ConnectWithOtpContext/ConnectWithOtpProvider.cjs +1 -0
- package/src/lib/context/ConnectWithOtpContext/ConnectWithOtpProvider.js +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +3 -8
- package/src/lib/context/DynamicContext/DynamicContext.js +4 -9
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.cjs +1 -0
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.js +1 -0
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.cjs +1 -0
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.js +1 -0
- package/src/lib/context/DynamicContext/useDynamicContext/useOverrides/useOverrides.cjs +1 -0
- package/src/lib/context/DynamicContext/useDynamicContext/useOverrides/useOverrides.js +1 -0
- package/src/lib/context/LoadingContext/LoadingContext.cjs +1 -0
- package/src/lib/context/LoadingContext/LoadingContext.js +1 -0
- package/src/lib/context/MockContext/MockContext.cjs +1 -0
- package/src/lib/context/MockContext/MockContext.js +1 -0
- package/src/lib/context/OnrampContext/OnrampContext.cjs +1 -0
- package/src/lib/context/OnrampContext/OnrampContext.js +1 -0
- package/src/lib/context/PasskeyContext/PasskeyContext.cjs +1 -0
- package/src/lib/context/PasskeyContext/PasskeyContext.js +1 -0
- package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.cjs +1 -0
- package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.js +1 -0
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.cjs +1 -0
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.js +1 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +1 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.js +1 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +1 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +1 -0
- package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.cjs +1 -0
- package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.js +1 -0
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.cjs +1 -0
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +1 -0
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +2 -0
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +2 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +1 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +1 -0
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +1 -0
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +1 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +1 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +1 -0
- package/src/lib/locale/en/translation.cjs +13 -29
- package/src/lib/locale/en/translation.d.ts +11 -27
- package/src/lib/locale/en/translation.js +13 -29
- package/src/lib/modals/AddNetworkModal/AddNetworkModal.cjs +1 -0
- package/src/lib/modals/AddNetworkModal/AddNetworkModal.js +1 -0
- package/src/lib/modals/ConfirmationModal/ConfirmationModal.cjs +1 -0
- package/src/lib/modals/ConfirmationModal/ConfirmationModal.js +1 -0
- package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.cjs +1 -0
- package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.js +1 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +1 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +1 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +1 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +1 -0
- package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.cjs +2 -1
- package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.js +2 -1
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +1 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +1 -0
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.cjs +1 -0
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.js +1 -0
- package/src/lib/shared/assets/index.d.ts +1 -0
- package/src/lib/shared/assets/{currency.cjs → wallet-with-sunglasses.cjs} +14 -26
- package/src/lib/shared/assets/wallet-with-sunglasses.js +34 -0
- package/src/lib/store/index.d.ts +1 -0
- package/src/lib/store/state/nonce/nonce.cjs +1 -0
- package/src/lib/store/state/nonce/nonce.js +1 -0
- package/src/lib/store/state/projectSettings/projectSettings.cjs +1 -0
- package/src/lib/store/state/projectSettings/projectSettings.js +1 -0
- package/src/lib/store/utils/didStoreVersionChanged/didStoreVersionChanged.cjs +13 -0
- package/src/lib/store/utils/didStoreVersionChanged/didStoreVersionChanged.d.ts +2 -0
- package/src/lib/store/utils/didStoreVersionChanged/didStoreVersionChanged.js +8 -0
- package/src/lib/store/utils/didStoreVersionChanged/index.d.ts +1 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/isNetworkUnsupported/isNetworkUnsupported.cjs +2 -4
- package/src/lib/utils/functions/isNetworkUnsupported/isNetworkUnsupported.d.ts +2 -2
- package/src/lib/utils/functions/isNetworkUnsupported/isNetworkUnsupported.js +2 -4
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +1 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +1 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +1 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +1 -0
- package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/useOtpVerificationRequest.cjs +1 -0
- package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/useOtpVerificationRequest.js +1 -0
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +1 -0
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +1 -0
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +1 -0
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +1 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +1 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +1 -0
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs +1 -0
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js +1 -0
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +1 -0
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +1 -0
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +1 -0
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +1 -0
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +1 -0
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +1 -0
- package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.cjs +3 -1
- package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.d.ts +1 -0
- package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.js +3 -1
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.cjs +1 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.js +1 -0
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.cjs +1 -0
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.js +1 -0
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs +1 -0
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js +1 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +1 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +1 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.cjs +1 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.js +1 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.cjs +1 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.js +1 -0
- package/src/lib/utils/hooks/useEmbeddedWalletAuthenticator/useEmbeddedWalletAuthenticator.cjs +1 -0
- package/src/lib/utils/hooks/useEmbeddedWalletAuthenticator/useEmbeddedWalletAuthenticator.js +1 -0
- package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.cjs +1 -0
- package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.js +1 -0
- package/src/lib/utils/hooks/useFundWithWallet/useConnectWalletForFunding/useConnectWalletForFunding.cjs +1 -0
- package/src/lib/utils/hooks/useFundWithWallet/useConnectWalletForFunding/useConnectWalletForFunding.js +1 -0
- package/src/lib/utils/hooks/useFundWithWallet/useFund/useFund.cjs +1 -0
- package/src/lib/utils/hooks/useFundWithWallet/useFund/useFund.js +1 -0
- package/src/lib/utils/hooks/useFundWithWallet/usePromptAmountAndFundWithWallet/usePromptAmountAndFundWithWallet.cjs +1 -0
- package/src/lib/utils/hooks/useFundWithWallet/usePromptAmountAndFundWithWallet/usePromptAmountAndFundWithWallet.js +1 -0
- package/src/lib/utils/hooks/useHandleAuthenticatedUser/useHandleAuthenticatedUser.cjs +1 -0
- package/src/lib/utils/hooks/useHandleAuthenticatedUser/useHandleAuthenticatedUser.js +1 -0
- package/src/lib/utils/hooks/useHandleVerificationRequired/useHandleVerificationRequired.cjs +1 -0
- package/src/lib/utils/hooks/useHandleVerificationRequired/useHandleVerificationRequired.js +1 -0
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +1 -0
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +1 -0
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.cjs +1 -0
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.js +1 -0
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.cjs +1 -0
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.js +1 -0
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs +1 -0
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js +1 -0
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +1 -0
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +1 -0
- package/src/lib/utils/hooks/useMergeUserAccounts/useMergeUserAccounts.cjs +1 -0
- package/src/lib/utils/hooks/useMergeUserAccounts/useMergeUserAccounts.js +1 -0
- package/src/lib/utils/hooks/useMfa/useMfa.cjs +5 -0
- package/src/lib/utils/hooks/useMfa/useMfa.js +5 -0
- package/src/lib/utils/hooks/useMfaModals/useMfaModals.cjs +24 -7
- package/src/lib/utils/hooks/useMfaModals/useMfaModals.d.ts +1 -0
- package/src/lib/utils/hooks/useMfaModals/useMfaModals.js +24 -7
- package/src/lib/utils/hooks/useNetworkDataFromWallet/useNetworkDataFromWallet.cjs +1 -0
- package/src/lib/utils/hooks/useNetworkDataFromWallet/useNetworkDataFromWallet.js +1 -0
- package/src/lib/utils/hooks/useNetworkNotSupported/useNetworkNotSupported.cjs +1 -0
- package/src/lib/utils/hooks/useNetworkNotSupported/useNetworkNotSupported.js +1 -0
- package/src/lib/utils/hooks/useOnlyConnectedMode/useOnlyConnectedMode.cjs +1 -0
- package/src/lib/utils/hooks/useOnlyConnectedMode/useOnlyConnectedMode.js +1 -0
- package/src/lib/utils/hooks/useOpenFundingOptions/useOpenFundingOptions.cjs +1 -0
- package/src/lib/utils/hooks/useOpenFundingOptions/useOpenFundingOptions.js +1 -0
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +1 -0
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +1 -0
- package/src/lib/utils/hooks/useRefreshUser/useRefreshUser.cjs +1 -0
- package/src/lib/utils/hooks/useRefreshUser/useRefreshUser.js +1 -0
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.cjs +1 -0
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.js +1 -0
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.cjs +1 -0
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.js +1 -0
- package/src/lib/utils/hooks/useSmartWallets/useSmartWallets.cjs +1 -0
- package/src/lib/utils/hooks/useSmartWallets/useSmartWallets.js +1 -0
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +1 -0
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +1 -0
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +1 -0
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +1 -0
- package/src/lib/utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs +1 -0
- package/src/lib/utils/hooks/useSubdomainCheck/useSubdomainCheck.js +1 -0
- package/src/lib/utils/hooks/useSwitchWallet/useSwitchWallet.cjs +1 -0
- package/src/lib/utils/hooks/useSwitchWallet/useSwitchWallet.js +1 -0
- package/src/lib/utils/hooks/useSyncEmbeddedWalletFlow/useSyncEmbeddedWalletFlow.cjs +1 -0
- package/src/lib/utils/hooks/useSyncEmbeddedWalletFlow/useSyncEmbeddedWalletFlow.js +1 -0
- package/src/lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.cjs +1 -0
- package/src/lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.js +1 -0
- package/src/lib/utils/hooks/useSyncOnboardingFlow/useSyncOnboardingFlow.cjs +1 -0
- package/src/lib/utils/hooks/useSyncOnboardingFlow/useSyncOnboardingFlow.js +1 -0
- package/src/lib/utils/hooks/useTelegramLogin/useTelegramLogin.cjs +1 -0
- package/src/lib/utils/hooks/useTelegramLogin/useTelegramLogin.js +1 -0
- package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.cjs +1 -0
- package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.js +1 -0
- package/src/lib/utils/hooks/useTransactionSimulation/classes/useBaseTransactionSimulation.cjs +1 -0
- package/src/lib/utils/hooks/useTransactionSimulation/classes/useBaseTransactionSimulation.js +1 -0
- package/src/lib/utils/hooks/useTransferWallet/useTransferWallet.cjs +1 -0
- package/src/lib/utils/hooks/useTransferWallet/useTransferWallet.js +1 -0
- package/src/lib/utils/hooks/useUpgradeEmbeddedWallet/useUpgradeEmbeddedWallet.cjs +1 -0
- package/src/lib/utils/hooks/useUpgradeEmbeddedWallet/useUpgradeEmbeddedWallet.js +1 -0
- package/src/lib/utils/hooks/useUserAuth/useUserAuth.cjs +1 -0
- package/src/lib/utils/hooks/useUserAuth/useUserAuth.js +1 -0
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs +1 -0
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js +1 -0
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +1 -0
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +1 -0
- package/src/lib/utils/hooks/useValidateSession/handleStoreVersionChanged/handleStoreVersionChanged.cjs +10 -3
- package/src/lib/utils/hooks/useValidateSession/handleStoreVersionChanged/handleStoreVersionChanged.d.ts +1 -3
- package/src/lib/utils/hooks/useValidateSession/handleStoreVersionChanged/handleStoreVersionChanged.js +10 -3
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.cjs +6 -3
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.d.ts +1 -3
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.js +6 -3
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +1 -0
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +1 -0
- package/src/lib/utils/hooks/useViewSettings/useViewSettings.cjs +1 -0
- package/src/lib/utils/hooks/useViewSettings/useViewSettings.js +1 -0
- package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.cjs +1 -0
- package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.js +1 -0
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +1 -0
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +1 -0
- package/src/lib/utils/hooks/useWalletList/useWalletList.cjs +1 -0
- package/src/lib/utils/hooks/useWalletList/useWalletList.js +1 -0
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.cjs +1 -0
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.js +1 -0
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +2 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +2 -1
- package/src/lib/views/AccessBlockedView/AccessBlockedView.cjs +1 -0
- package/src/lib/views/AccessBlockedView/AccessBlockedView.js +1 -0
- package/src/lib/views/AccountExistsView/AccountExistsView.cjs +1 -0
- package/src/lib/views/AccountExistsView/AccountExistsView.js +1 -0
- package/src/lib/views/AddNetworkView/AddNetworkView.cjs +1 -0
- package/src/lib/views/AddNetworkView/AddNetworkView.js +1 -0
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +1 -0
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +1 -0
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +1 -0
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +1 -0
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +1 -0
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +1 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +1 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +1 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +3 -4
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +3 -4
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +1 -0
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +1 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/UserField/UserField.cjs +1 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/UserField/UserField.js +1 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.cjs +1 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.js +1 -0
- package/src/lib/views/CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.cjs +1 -0
- package/src/lib/views/CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.js +1 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -0
- package/src/lib/views/EmailVerification/EmailVerification.cjs +1 -0
- package/src/lib/views/EmailVerification/EmailVerification.js +1 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -0
- package/src/lib/views/EmbeddedDeleteView/EmbeddedDeleteView.cjs +1 -0
- package/src/lib/views/EmbeddedDeleteView/EmbeddedDeleteView.js +1 -0
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +1 -0
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +1 -0
- package/src/lib/views/FarcasterConnectView/FarcasterConnectView.cjs +1 -0
- package/src/lib/views/FarcasterConnectView/FarcasterConnectView.js +1 -0
- package/src/lib/views/GlobalWalletConfirmView/GlobalWalletConfirmView.cjs +1 -0
- package/src/lib/views/GlobalWalletConfirmView/GlobalWalletConfirmView.js +1 -0
- package/src/lib/views/GlobalWalletMaliciousView/GlobalWalletMaliciousView.cjs +1 -0
- package/src/lib/views/GlobalWalletMaliciousView/GlobalWalletMaliciousView.js +1 -0
- package/src/lib/views/LoginView/LoginViewSection/LoginViewSection.cjs +1 -0
- package/src/lib/views/LoginView/LoginViewSection/LoginViewSection.js +1 -0
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +1 -0
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +1 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs +1 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js +1 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.cjs +1 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.js +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.cjs +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.js +1 -0
- package/src/lib/views/LoginView/sections/ToggleableSection/ToggleableSection.cjs +1 -0
- package/src/lib/views/LoginView/sections/ToggleableSection/ToggleableSection.js +1 -0
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +1 -0
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +1 -0
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.cjs +1 -0
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.js +1 -0
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +1 -0
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +1 -0
- package/src/lib/views/LoginView/useLoginView/useLoginView.cjs +1 -0
- package/src/lib/views/LoginView/useLoginView/useLoginView.js +1 -0
- package/src/lib/views/MergeUserAccountsConflictsView/MergeUserAccountsConflictsView.cjs +1 -0
- package/src/lib/views/MergeUserAccountsConflictsView/MergeUserAccountsConflictsView.js +1 -0
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +1 -0
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +1 -0
- package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.cjs +1 -0
- package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.js +1 -0
- package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.cjs +2 -1
- package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.js +2 -1
- package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.cjs +1 -0
- package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.js +1 -0
- package/src/lib/views/MfaRecoveryView/MfaRecoveryView.cjs +1 -0
- package/src/lib/views/MfaRecoveryView/MfaRecoveryView.js +1 -0
- package/src/lib/views/MfaSecureDeviceHelpView/MfaSecureDeviceHelpView.cjs +1 -0
- package/src/lib/views/MfaSecureDeviceHelpView/MfaSecureDeviceHelpView.js +1 -0
- package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.cjs +1 -0
- package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.js +1 -0
- package/src/lib/views/MfaVerificationView/MfaVerificationView.cjs +1 -0
- package/src/lib/views/MfaVerificationView/MfaVerificationView.js +1 -0
- package/src/lib/views/MobileWalletRedirectView/MobileWalletRedirectView.cjs +1 -0
- package/src/lib/views/MobileWalletRedirectView/MobileWalletRedirectView.js +1 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +4 -4
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +4 -4
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +1 -0
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +1 -0
- package/src/lib/views/NoAccess/NoAccess.cjs +1 -0
- package/src/lib/views/NoAccess/NoAccess.js +1 -0
- package/src/lib/views/NoAccess/useNoAccessText.cjs +1 -0
- package/src/lib/views/NoAccess/useNoAccessText.js +1 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +1 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +1 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +1 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +1 -0
- package/src/lib/views/Passkey/EmbeddedAuthChoice/AuthChoiceInfo/AuthChoiceInfo.cjs +1 -0
- package/src/lib/views/Passkey/EmbeddedAuthChoice/AuthChoiceInfo/AuthChoiceInfo.js +1 -0
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.cjs +1 -0
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.js +1 -0
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.cjs +1 -0
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.js +1 -0
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.cjs +1 -0
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.js +1 -0
- package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.cjs +1 -0
- package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.js +1 -0
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +1 -0
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +1 -0
- package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.cjs +1 -0
- package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.js +1 -0
- package/src/lib/views/Passkey/PasskeyRecovery/AddRecoveryEmail/AddRecoveryEmail.cjs +1 -0
- package/src/lib/views/Passkey/PasskeyRecovery/AddRecoveryEmail/AddRecoveryEmail.js +1 -0
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.cjs +1 -0
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.js +1 -0
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.cjs +1 -0
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.js +1 -0
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +1 -0
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +1 -0
- package/src/lib/views/Passkey/RenamePasskeyView/RenamePasskeyView.cjs +1 -0
- package/src/lib/views/Passkey/RenamePasskeyView/RenamePasskeyView.js +1 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +1 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.js +1 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +1 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +1 -0
- package/src/lib/views/QrCodeView/QrCodeView.cjs +1 -0
- package/src/lib/views/QrCodeView/QrCodeView.js +1 -0
- package/src/lib/views/SandboxMaximumThresholdReached/SandboxMaximumThresholdReached.cjs +1 -0
- package/src/lib/views/SandboxMaximumThresholdReached/SandboxMaximumThresholdReached.js +1 -0
- package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.cjs +1 -0
- package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.js +1 -0
- package/src/lib/views/SelectWalletInWalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +1 -0
- package/src/lib/views/SelectWalletInWalletGroupView/components/WalletGroupItem/WalletGroupItem.js +1 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -0
- package/src/lib/views/SmsVerification/SmsVerification.cjs +1 -0
- package/src/lib/views/SmsVerification/SmsVerification.js +1 -0
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.cjs +1 -0
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.js +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +1 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +1 -0
- package/src/lib/views/SubdomainField/SubdomainField.cjs +1 -0
- package/src/lib/views/SubdomainField/SubdomainField.js +1 -0
- package/src/lib/views/SyncWalletView/AutoReconnectingView/AutoReconnectingView.cjs +1 -0
- package/src/lib/views/SyncWalletView/AutoReconnectingView/AutoReconnectingView.js +1 -0
- package/src/lib/views/SyncWalletView/ReconnectWithQrCodeView/ReconnectWithQrCodeView.cjs +1 -0
- package/src/lib/views/SyncWalletView/ReconnectWithQrCodeView/ReconnectWithQrCodeView.js +1 -0
- package/src/lib/views/SyncWalletView/SwitchWalletView/SwitchWalletView.cjs +1 -0
- package/src/lib/views/SyncWalletView/SwitchWalletView/SwitchWalletView.js +1 -0
- package/src/lib/views/SyncWalletView/SyncWalletView.cjs +1 -0
- package/src/lib/views/SyncWalletView/SyncWalletView.js +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +1 -0
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.cjs +1 -0
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.js +1 -0
- package/src/lib/views/UserFieldEditorView/useAssignDefaultValues/useAssignDefaultValues.cjs +1 -0
- package/src/lib/views/UserFieldEditorView/useAssignDefaultValues/useAssignDefaultValues.js +1 -0
- package/src/lib/views/WalletAlreadyExistsView/WalletAlreadyExistsView.cjs +1 -0
- package/src/lib/views/WalletAlreadyExistsView/WalletAlreadyExistsView.js +1 -0
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +1 -0
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +1 -0
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +1 -0
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.js +1 -0
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +1 -0
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +1 -0
- package/src/lib/views/WalletList/WalletList.cjs +1 -0
- package/src/lib/views/WalletList/WalletList.js +1 -0
- package/src/lib/views/WalletList/WalletListGridTabs/WalletListGridTabs.cjs +1 -0
- package/src/lib/views/WalletList/WalletListGridTabs/WalletListGridTabs.js +1 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +1 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +1 -0
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +1 -0
- package/src/lib/views/WalletLockedView/WalletLockedView.js +1 -0
- package/src/lib/views/WalletRedirectView/WalletRedirectView.cjs +1 -0
- package/src/lib/views/WalletRedirectView/WalletRedirectView.js +1 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +1 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +1 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -0
- package/src/lib/views/viewToComponentMap.cjs +1 -0
- package/src/lib/views/viewToComponentMap.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js +1 -0
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.cjs +1 -0
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.js +1 -0
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.cjs +1 -0
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.js +1 -0
- package/src/lib/widgets/DynamicMultiWalletPromptsWidget/DynamicMultiWalletPromptsWidget.cjs +1 -0
- package/src/lib/widgets/DynamicMultiWalletPromptsWidget/DynamicMultiWalletPromptsWidget.js +1 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +7 -9
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +8 -10
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/TokenBalanceItem/TokenBalanceItem.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/TokenBalanceItem/TokenBalanceItem.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/TokenBalanceList/TokenBalanceList.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/TokenBalanceList/TokenBalanceList.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.cjs +3 -6
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.js +3 -6
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/PromptModal/PromptModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/PromptModal/PromptModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/WalletDetailsCard/WalletDetailsCard.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/WalletDetailsCard/WalletDetailsCard.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +1 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +1 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.cjs +4 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.js +4 -1
- package/src/lib/widgets/DynamicWidget/hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.js +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.js +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useMultiWalletPromptState/useMultiWalletPromptState.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useMultiWalletPromptState/useMultiWalletPromptState.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/AwaitingConnectionModal/AwaitingConnectionModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/AwaitingConnectionModal/AwaitingConnectionModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/ChooseOnrampProviderView/ChooseOnrampProviderView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/ChooseOnrampProviderView/ChooseOnrampProviderView.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useFundingMethods.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useFundingMethods.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/ConnectedAppsView/ConnectedAppsView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/ConnectedAppsView/ConnectedAppsView.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/DepositView/DepositView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/DepositView/DepositView.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.cjs +3 -2
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.js +3 -2
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/utils/sort.cjs +2 -4
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/utils/sort.d.ts +1 -3
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/utils/sort.js +3 -3
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/ReceiveExternalWalletFunds.cjs +99 -49
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/ReceiveExternalWalletFunds.js +95 -45
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenOption/TokenOption.cjs +22 -10
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenOption/TokenOption.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenOption/TokenOption.js +22 -10
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenSelectScreen.cjs +4 -3
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenSelectScreen.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenSelectScreen.js +4 -3
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/types.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/calculateFiatBalance/calculateFiatBalance.cjs +27 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/calculateFiatBalance/calculateFiatBalance.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/calculateFiatBalance/calculateFiatBalance.js +23 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/calculateFiatBalance/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/convert/convert.cjs +4 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/convert/convert.js +4 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/convertScientificToDecimal/convertScientificToDecimal.cjs +33 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/convertScientificToDecimal/convertScientificToDecimal.d.ts +8 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/convertScientificToDecimal/convertScientificToDecimal.js +29 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/convertScientificToDecimal/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/formatValue.cjs +26 -27
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/formatValue.d.ts +6 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/formatValue.js +26 -27
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/isFiatToken/isFiatToken.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/isFiatToken/isFiatToken.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/isFiatToken/isFiatToken.js +2 -1
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useExchangeRatesForFunding/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useExchangeRatesForFunding/useExchangeRatesForFunding.cjs +32 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useExchangeRatesForFunding/useExchangeRatesForFunding.d.ts +9 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useExchangeRatesForFunding/useExchangeRatesForFunding.js +28 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useTokensForFunding/useTokensForFunding.cjs +28 -15
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useTokensForFunding/useTokensForFunding.js +28 -15
- package/src/lib/widgets/DynamicWidget/views/SettingsView/EmptyScreen/EmptyScreen.cjs +20 -0
- package/src/lib/widgets/DynamicWidget/views/SettingsView/EmptyScreen/EmptyScreen.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/SettingsView/EmptyScreen/EmptyScreen.js +16 -0
- package/src/lib/widgets/DynamicWidget/views/SettingsView/EmptyScreen/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +4 -6
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +4 -6
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +1 -0
- package/src/lib/widgets/OnrampWidget/OnrampWidget.cjs +1 -0
- package/src/lib/widgets/OnrampWidget/OnrampWidget.js +1 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.d.ts +0 -23
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/index.d.ts +0 -1
- package/src/lib/shared/assets/currency.js +0 -46
|
@@ -47,7 +47,6 @@ require('../../../../utils/functions/compareChains/compareChains.cjs');
|
|
|
47
47
|
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
48
48
|
require('../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
|
|
49
49
|
require('bs58');
|
|
50
|
-
var usePromise = require('../../../../utils/hooks/usePromise/usePromise.cjs');
|
|
51
50
|
require('@dynamic-labs/types');
|
|
52
51
|
require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
53
52
|
require('../../../../context/LoadingContext/LoadingContext.cjs');
|
|
@@ -60,6 +59,7 @@ require('../../../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
|
60
59
|
require('../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
61
60
|
require('@dynamic-labs/rpc-providers');
|
|
62
61
|
require('../../../../store/state/loadingAndLifecycle.cjs');
|
|
62
|
+
require('@dynamic-labs/store');
|
|
63
63
|
require('../../../../store/state/walletOptions/walletOptions.cjs');
|
|
64
64
|
var Typography = require('../../../../components/Typography/Typography.cjs');
|
|
65
65
|
require('../../../../context/FooterAnimationContext/index.cjs');
|
|
@@ -77,6 +77,7 @@ var Icon = require('../../../../components/Icon/Icon.cjs');
|
|
|
77
77
|
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
78
78
|
var IconButton = require('../../../../components/IconButton/IconButton.cjs');
|
|
79
79
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
80
|
+
var Image = require('../../../../components/Image/Image.cjs');
|
|
80
81
|
var TypographyButton = require('../../../../components/TypographyButton/TypographyButton.cjs');
|
|
81
82
|
require('formik');
|
|
82
83
|
require('../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
|
|
@@ -102,7 +103,6 @@ require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
|
102
103
|
require('../../../../components/IsBrowser/IsBrowser.cjs');
|
|
103
104
|
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
104
105
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
105
|
-
var exchangeRates = require('../../../../data/api/exchangeRates/exchangeRates.cjs');
|
|
106
106
|
var FormattedInput = require('./FormattedInput/FormattedInput.cjs');
|
|
107
107
|
var formattedInputEmitter = require('./FormattedInput/formattedInputEmitter.cjs');
|
|
108
108
|
var TokenSelectScreen = require('./TokenSelectScreen/TokenSelectScreen.cjs');
|
|
@@ -112,8 +112,10 @@ var formatValue = require('./utils/formatValue/formatValue.cjs');
|
|
|
112
112
|
var isFiatToken = require('./utils/isFiatToken/isFiatToken.cjs');
|
|
113
113
|
var isNonZero = require('./utils/isNonZero/isNonZero.cjs');
|
|
114
114
|
var respectsMinimum = require('./utils/respectsMinimum/respectsMinimum.cjs');
|
|
115
|
+
var useExchangeRatesForFunding = require('./utils/useExchangeRatesForFunding/useExchangeRatesForFunding.cjs');
|
|
115
116
|
var useSubmitExternalWalletFunding = require('./utils/useSubmitExternalWalletFunding/useSubmitExternalWalletFunding.cjs');
|
|
116
117
|
var useTokensForFunding = require('./utils/useTokensForFunding/useTokensForFunding.cjs');
|
|
118
|
+
var calculateFiatBalance = require('./utils/calculateFiatBalance/calculateFiatBalance.cjs');
|
|
117
119
|
|
|
118
120
|
const defaultQuickSuggestions = {
|
|
119
121
|
token: 'USD',
|
|
@@ -123,7 +125,7 @@ const rulesThatHideQuickSuggestions = ['exact', 'minimum'];
|
|
|
123
125
|
const rulesThatDisableTokenSelect = ['exact', 'exact-with-amount'];
|
|
124
126
|
const inputEmitter = formattedInputEmitter.createFormattedInputEmitter();
|
|
125
127
|
const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialTokenRaw, externalWallet, quickSuggestions = defaultQuickSuggestions, }) => {
|
|
126
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
128
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
127
129
|
// For now we hardcode the default value, soon we will fetch this from project settings
|
|
128
130
|
const initialToken = initialTokenRaw !== null && initialTokenRaw !== void 0 ? initialTokenRaw : {
|
|
129
131
|
rule: 'recommended',
|
|
@@ -146,10 +148,9 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
|
|
|
146
148
|
const { isLoading: tokenBalancesLoading, tokens: tokenBalances } = useTokensForFunding.useTokensForFunding({
|
|
147
149
|
wallet: externalWallet,
|
|
148
150
|
});
|
|
149
|
-
const
|
|
150
|
-
initialData: {},
|
|
151
|
+
const exchangeRates = useExchangeRatesForFunding.useExchangeRatesForFunding({
|
|
151
152
|
// Initialize amounts after exchange rates are fetched
|
|
152
|
-
|
|
153
|
+
onFetch: (exchangeRates) => {
|
|
153
154
|
if (tokenAmount === undefined && fiatAmount !== undefined) {
|
|
154
155
|
setTokenAmount(convert.convertFromFiat(fiatAmount, tokenSymbol, exchangeRates));
|
|
155
156
|
}
|
|
@@ -157,39 +158,46 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
|
|
|
157
158
|
setFiatAmount(convert.convertToFiat(tokenAmount, tokenSymbol, exchangeRates));
|
|
158
159
|
}
|
|
159
160
|
},
|
|
161
|
+
tokenBalances,
|
|
160
162
|
});
|
|
161
163
|
const [tokenAmount, setTokenAmount] = React.useState(isInitialAmountValueForToken
|
|
162
164
|
? (_a = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _a !== void 0 ? _a : ''
|
|
163
|
-
: convert.convertFromFiat((_b = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _b !== void 0 ? _b : '', initialToken.value, exchangeRates
|
|
165
|
+
: convert.convertFromFiat((_b = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _b !== void 0 ? _b : '', initialToken.value, exchangeRates));
|
|
164
166
|
const [tokenSymbol, _setTokenSymbol] = React.useState(initialToken.value);
|
|
165
|
-
const
|
|
167
|
+
const [fiatAmount, setFiatAmount] = React.useState(isInitialAmountValueForToken
|
|
168
|
+
? convert.convertToFiat(tokenAmount !== null && tokenAmount !== void 0 ? tokenAmount : '', tokenSymbol, exchangeRates)
|
|
169
|
+
: (_c = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _c !== void 0 ? _c : '');
|
|
170
|
+
const setTokenSymbol = React.useCallback((symbol) => {
|
|
166
171
|
setHasUserInteracted(true);
|
|
167
172
|
_setTokenSymbol(symbol);
|
|
168
173
|
if (fiatAmount)
|
|
169
|
-
setTokenAmount(convert.convertFromFiat(fiatAmount, symbol, exchangeRates
|
|
170
|
-
};
|
|
171
|
-
const [fiatAmount, setFiatAmount] = React.useState(isInitialAmountValueForToken
|
|
172
|
-
? convert.convertToFiat(tokenAmount !== null && tokenAmount !== void 0 ? tokenAmount : '', tokenSymbol, exchangeRates$1)
|
|
173
|
-
: (_c = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _c !== void 0 ? _c : '');
|
|
174
|
+
setTokenAmount(convert.convertFromFiat(fiatAmount, symbol, exchangeRates));
|
|
175
|
+
}, [fiatAmount, exchangeRates]);
|
|
174
176
|
// When we eventually allow changing this, add setter as _setFiatSymbol
|
|
175
177
|
// And then create a setFiatSymbol function similar to how we have setTokenSymbol
|
|
176
178
|
const [fiatSymbol] = React.useState('USD');
|
|
177
|
-
const setAmountsByTokenValue = (amount) => {
|
|
179
|
+
const setAmountsByTokenValue = React.useCallback((amount) => {
|
|
178
180
|
setTokenAmount(amount);
|
|
179
|
-
setFiatAmount(convert.convertToFiat(amount, tokenSymbol, exchangeRates
|
|
180
|
-
};
|
|
181
|
-
const setAmountsByFiatValue = (amount) => {
|
|
181
|
+
setFiatAmount(convert.convertToFiat(amount, tokenSymbol, exchangeRates));
|
|
182
|
+
}, [tokenSymbol, exchangeRates]);
|
|
183
|
+
const setAmountsByFiatValue = React.useCallback((amount) => {
|
|
182
184
|
setFiatAmount(amount);
|
|
183
|
-
setTokenAmount(convert.convertFromFiat(amount, tokenSymbol, exchangeRates
|
|
184
|
-
};
|
|
185
|
+
setTokenAmount(convert.convertFromFiat(amount, tokenSymbol, exchangeRates));
|
|
186
|
+
}, [tokenSymbol, exchangeRates]);
|
|
185
187
|
const [showTokenAsPrimary, setShowTokenAsPrimary] = React.useState(false);
|
|
186
|
-
const switchPrimaryAndSecondary = () => {
|
|
188
|
+
const switchPrimaryAndSecondary = React.useCallback(() => {
|
|
187
189
|
setHasUserInteracted(true);
|
|
188
190
|
setShowTokenAsPrimary(!showTokenAsPrimary);
|
|
191
|
+
if (tokenAmount && isNaN(parseFloat(tokenAmount))) {
|
|
192
|
+
setTokenAmount('');
|
|
193
|
+
}
|
|
194
|
+
if (fiatAmount && isNaN(parseFloat(fiatAmount))) {
|
|
195
|
+
setFiatAmount('');
|
|
196
|
+
}
|
|
189
197
|
inputEmitter.emit('focus');
|
|
190
|
-
};
|
|
198
|
+
}, [fiatAmount, showTokenAsPrimary, tokenAmount]);
|
|
191
199
|
const isMinimumRespected = minimum
|
|
192
|
-
? respectsMinimum.respectsMinimum({ token: fiatSymbol, value: fiatAmount !== null && fiatAmount !== void 0 ? fiatAmount : '' }, minimum, exchangeRates
|
|
200
|
+
? respectsMinimum.respectsMinimum({ token: fiatSymbol, value: fiatAmount !== null && fiatAmount !== void 0 ? fiatAmount : '' }, minimum, exchangeRates)
|
|
193
201
|
: true;
|
|
194
202
|
const [primaryData, secondaryData] = showTokenAsPrimary
|
|
195
203
|
? [
|
|
@@ -208,17 +216,17 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
|
|
|
208
216
|
},
|
|
209
217
|
{ amount: tokenAmount, symbol: tokenSymbol },
|
|
210
218
|
];
|
|
211
|
-
const secondaryDisplayHasFixedZeros = isFiatToken.isFiatToken(secondaryData.symbol) || secondaryData.symbol === 'USDC';
|
|
212
219
|
const secondaryDisplay = formatValue.formatValue({
|
|
220
|
+
maxDecimals: isFiatToken.isFiatOrStablecoin(secondaryData.symbol) ? 2 : undefined,
|
|
213
221
|
symbol: secondaryData.symbol,
|
|
214
222
|
value: secondaryData.amount,
|
|
215
|
-
withFixedZeros:
|
|
223
|
+
withFixedZeros: isFiatToken.isFiatOrStablecoin(secondaryData.symbol),
|
|
216
224
|
});
|
|
217
225
|
const quickSuggestionsWithToken = Array.isArray(quickSuggestions)
|
|
218
226
|
? { token: 'USD', values: quickSuggestions }
|
|
219
227
|
: quickSuggestions;
|
|
220
228
|
const quickSuggestionsParsed = quickSuggestionsWithToken.values
|
|
221
|
-
.filter((value) => respectsMinimum.respectsMinimum({ token: quickSuggestionsWithToken.token, value: value.toString() }, minimum, exchangeRates
|
|
229
|
+
.filter((value) => respectsMinimum.respectsMinimum({ token: quickSuggestionsWithToken.token, value: value.toString() }, minimum, exchangeRates))
|
|
222
230
|
.map((value) => ({
|
|
223
231
|
display: formatValue.formatValue({
|
|
224
232
|
symbol: quickSuggestionsWithToken.token,
|
|
@@ -227,10 +235,33 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
|
|
|
227
235
|
value,
|
|
228
236
|
}))
|
|
229
237
|
.filter(({ display }) => display !== undefined);
|
|
230
|
-
const
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
|
|
238
|
+
const currentToken = tokenBalances === null || tokenBalances === void 0 ? void 0 : tokenBalances.find(({ symbol }) => symbol === tokenSymbol);
|
|
239
|
+
const fiatBalance = calculateFiatBalance.calculateFiatBalance(currentToken, exchangeRates);
|
|
240
|
+
const [primaryBalance, secondaryBalance] = showTokenAsPrimary
|
|
241
|
+
? [
|
|
242
|
+
{
|
|
243
|
+
symbol: tokenSymbol,
|
|
244
|
+
value: (_d = currentToken === null || currentToken === void 0 ? void 0 : currentToken.balance) !== null && _d !== void 0 ? _d : 0,
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
symbol: fiatSymbol,
|
|
248
|
+
value: fiatBalance,
|
|
249
|
+
},
|
|
250
|
+
]
|
|
251
|
+
: [
|
|
252
|
+
{
|
|
253
|
+
symbol: fiatSymbol,
|
|
254
|
+
value: fiatBalance,
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
symbol: tokenSymbol,
|
|
258
|
+
value: (_e = currentToken === null || currentToken === void 0 ? void 0 : currentToken.balance) !== null && _e !== void 0 ? _e : 0,
|
|
259
|
+
},
|
|
260
|
+
];
|
|
261
|
+
const showNotEnoughBalance = Boolean(!currentToken ||
|
|
262
|
+
(isNonZero.isNonZero(tokenAmount) &&
|
|
263
|
+
tokenAmount !== undefined &&
|
|
264
|
+
currentToken.balance < parseFloat(tokenAmount)));
|
|
234
265
|
const showMinimumRequired = Boolean(!isMinimumRespected && !showNotEnoughBalance);
|
|
235
266
|
const showQuickSuggestions = quickSuggestionsParsed.length > 0 &&
|
|
236
267
|
!hasUserInteracted &&
|
|
@@ -239,62 +270,81 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
|
|
|
239
270
|
isFiatToken.isFiatToken(quickSuggestionsWithToken.token));
|
|
240
271
|
const disableTokenSelect = rulesThatDisableTokenSelect.includes(initialToken.rule);
|
|
241
272
|
const [showTokenSelect, setShowTokenSelect] = React.useState(false);
|
|
242
|
-
const handleSelectToken = (token) => {
|
|
273
|
+
const handleSelectToken = React.useCallback((token) => {
|
|
243
274
|
setTokenSymbol(token);
|
|
244
275
|
setShowTokenSelect(false);
|
|
245
|
-
};
|
|
246
|
-
const handleQuickSuggestion = (value) => {
|
|
276
|
+
}, [setTokenSymbol]);
|
|
277
|
+
const handleQuickSuggestion = React.useCallback((value) => {
|
|
247
278
|
setHasUserInteracted(true);
|
|
248
279
|
if (isFiatToken.isFiatToken(quickSuggestionsWithToken.token))
|
|
249
280
|
setAmountsByFiatValue(value.toString());
|
|
250
281
|
else
|
|
251
282
|
setAmountsByTokenValue(value.toString());
|
|
252
283
|
inputEmitter.emit('focus');
|
|
253
|
-
}
|
|
284
|
+
}, [
|
|
285
|
+
quickSuggestionsWithToken.token,
|
|
286
|
+
setAmountsByFiatValue,
|
|
287
|
+
setAmountsByTokenValue,
|
|
288
|
+
]);
|
|
254
289
|
const handleSubmit = useSubmitExternalWalletFunding.useSubmitExternalWalletFunding();
|
|
290
|
+
const disableSubmit = !isMinimumRespected || showNotEnoughBalance || !isNonZero.isNonZero(tokenAmount);
|
|
291
|
+
const closeTokenSelect = React.useCallback(() => {
|
|
292
|
+
setShowTokenSelect(false);
|
|
293
|
+
inputEmitter.emit('focus');
|
|
294
|
+
}, []);
|
|
255
295
|
const grayOutSecondaryDisplay = !isNonZero.isNonZero(secondaryData.amount) ||
|
|
256
|
-
(
|
|
296
|
+
(isFiatToken.isFiatOrStablecoin(secondaryData.symbol) &&
|
|
257
297
|
parseFloat((_f = secondaryData.amount) !== null && _f !== void 0 ? _f : '0') < 0.0099);
|
|
258
298
|
const inputSymbolProp = primaryData.symbol === 'USD'
|
|
259
299
|
? { leading: '$' }
|
|
260
300
|
: { trailing: primaryData.symbol };
|
|
261
301
|
const backButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', id: 'back-button', "data-testid": 'back-button', onClick: () => setDynamicWidgetView('choose-wallet-funding-method'), children: jsxRuntime.jsx(arrowLeft.ReactComponent, {}) }));
|
|
262
|
-
return (jsxRuntime.jsxs("div", { className: 'fund-from-wallet', children: [!disableTokenSelect && (jsxRuntime.jsx(TokenSelectScreen.TokenSelectScreen, { onClose:
|
|
302
|
+
return (jsxRuntime.jsxs("div", { className: 'fund-from-wallet', children: [!disableTokenSelect && (jsxRuntime.jsx(TokenSelectScreen.TokenSelectScreen, { onClose: closeTokenSelect, onSelectToken: handleSelectToken, tokens: tokenBalances !== null && tokenBalances !== void 0 ? tokenBalances : [], currentToken: tokenSymbol, className: classNames.classNames('fund-from-wallet__token-select', {
|
|
263
303
|
'fund-from-wallet__token-select--open': showTokenSelect,
|
|
264
|
-
}) })), jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', children: t('dyn_wallet_funding.from_external_wallet.funding_view.title') }) }), jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content', children: [jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__amount-container', children: [minimum && (jsxRuntime.jsx(Typography.Typography, { color: 'error-1', className: classNames.classNames('fund-from-wallet__content__amount-container__minimum-error', {
|
|
304
|
+
}), showTokenAsPrimary: showTokenAsPrimary, exchangeRates: exchangeRates })), jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', children: t('dyn_wallet_funding.from_external_wallet.funding_view.title') }) }), jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content', children: [jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__amount-container', children: [minimum && (jsxRuntime.jsx(Typography.Typography, { color: 'error-1', className: classNames.classNames('fund-from-wallet__content__amount-container__minimum-error', {
|
|
265
305
|
'fund-from-wallet__content__amount-container__minimum-error--visible': showMinimumRequired,
|
|
266
|
-
}), variant: 'body_normal', children: t('dyn_wallet_funding.from_external_wallet.funding_view.minimum_error', {
|
|
306
|
+
}), variant: 'body_normal', weight: 'medium', children: t('dyn_wallet_funding.from_external_wallet.funding_view.minimum_error', {
|
|
267
307
|
minimum: formatValue.formatValue({
|
|
268
308
|
symbol: minimum.token,
|
|
269
309
|
value: minimum.value,
|
|
270
310
|
}),
|
|
271
311
|
}) })), primaryData.amount !== undefined && (jsxRuntime.jsx(FormattedInput.FormattedInput, Object.assign({ className: 'fund-from-wallet__content__amount-container__amount', value: (initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.rule) === 'exact'
|
|
272
312
|
? (_g = formatValue.formatValue({
|
|
273
|
-
maxDecimals:
|
|
313
|
+
maxDecimals: isFiatToken.isFiatOrStablecoin(primaryData.symbol)
|
|
314
|
+
? 2
|
|
315
|
+
: 8,
|
|
274
316
|
symbol: undefined,
|
|
275
317
|
value: primaryData.amount,
|
|
276
|
-
withFixedZeros: isFiatToken.
|
|
277
|
-
primaryData.symbol === 'USDC',
|
|
318
|
+
withFixedZeros: isFiatToken.isFiatOrStablecoin(primaryData.symbol),
|
|
278
319
|
})) !== null && _g !== void 0 ? _g : primaryData.amount
|
|
279
320
|
: primaryData.amount, onChange: primaryData.setAmount, emitter: inputEmitter, onInteraction: () => setHasUserInteracted(true), locked: (initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.rule) === 'exact' }, inputSymbolProp))), primaryData.amount === undefined && (jsxRuntime.jsx(Skeleton.Skeleton, { dataTestId: 'primary-amount-skeleton', container: {
|
|
280
321
|
className: 'fund-from-wallet__content__amount-container__skeleton',
|
|
281
|
-
} })), showQuickSuggestions && (jsxRuntime.jsx("div", { className: 'fund-from-wallet__content__amount-container__quick-suggestions', children: quickSuggestionsParsed.map(({ display, value }) => (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', onClick: () => handleQuickSuggestion(value), children: display }, value))) })), !showQuickSuggestions && secondaryDisplay && (jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__amount-container__secondary-amount-container', children: [jsxRuntime.jsx(Typography.Typography, { weight: 'medium', className: classNames.classNames('fund-from-wallet__content__amount-container__secondary-amount-container__amount', {
|
|
322
|
+
} })), showQuickSuggestions && (jsxRuntime.jsx("div", { className: 'fund-from-wallet__content__amount-container__quick-suggestions', children: quickSuggestionsParsed.map(({ display, value }) => (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', onClick: () => handleQuickSuggestion(value), weight: 'medium', children: display }, value))) })), !showQuickSuggestions && secondaryDisplay && (jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__amount-container__secondary-amount-container', children: [(currentToken === null || currentToken === void 0 ? void 0 : currentToken.logoURI) ? (jsxRuntime.jsx(Image.Image, { dataTestId: 'token-icon', alt: tokenSymbol, src: currentToken.logoURI, className: 'fund-from-wallet__content__token-icon' })) : null, jsxRuntime.jsx(Typography.Typography, { weight: 'medium', className: classNames.classNames('fund-from-wallet__content__amount-container__secondary-amount-container__amount', {
|
|
282
323
|
'fund-from-wallet__content__amount-container__secondary-amount-container__amount--grayed-out': grayOutSecondaryDisplay,
|
|
283
324
|
}), children: secondaryDisplay }), jsxRuntime.jsx(Icon.Icon, { size: 'small', color: 'text-secondary', className: 'fund-from-wallet__content__amount-container__secondary-amount-container__switch', children: jsxRuntime.jsx(switchToggle.ReactComponent, { "data-testid": 'switch-primary-and-secondary', onClick: switchPrimaryAndSecondary }) })] })), !showQuickSuggestions && !secondaryDisplay && (jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__amount-container__secondary-missing', children: [jsxRuntime.jsx(Typography.Typography, { weight: 'medium', children: formatValue.formatValue({
|
|
284
325
|
symbol: secondaryData.symbol,
|
|
285
326
|
value: consts.UNAVAILABLE_VALUE,
|
|
286
|
-
}) }), jsxRuntime.jsx("div", { ref: setConversionErrorIconRef, children: jsxRuntime.jsx(Icon.Icon, { size: 'medium', color: 'text-tertiary', children: jsxRuntime.jsx(footerInfoIcon.ReactComponent, {}) }) }), jsxRuntime.jsx(Tooltip.Tooltip, { content: t('dyn_wallet_funding.from_external_wallet.funding_view.
|
|
327
|
+
}) }), jsxRuntime.jsx("div", { ref: setConversionErrorIconRef, children: jsxRuntime.jsx(Icon.Icon, { size: 'medium', color: 'text-tertiary', children: jsxRuntime.jsx(footerInfoIcon.ReactComponent, {}) }) }), jsxRuntime.jsx(Tooltip.Tooltip, { content: t('dyn_wallet_funding.from_external_wallet.funding_view.pricing_unavailable'), targetRef: conversionErrorIconRef, className: 'fund-from-wallet__content__amount-container__secondary-missing__tooltip' })] })), jsxRuntime.jsx(Typography.Typography, { color: 'error-1', className: classNames.classNames('fund-from-wallet__content__amount-container__balance-error', {
|
|
287
328
|
'fund-from-wallet__content__amount-container__balance-error--visible': showNotEnoughBalance,
|
|
288
|
-
}), variant: 'body_normal', children: t('dyn_wallet_funding.from_external_wallet.funding_view.balance_error') })] }), jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__wallet-card', children: [jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__wallet-card__wallet-details', children: [jsxRuntime.jsx(walletBook.WalletIcon, { icon: externalWallet.connector.metadata.icon, walletKey: externalWallet.connector.key, className: 'fund-from-wallet__content__wallet-card__wallet-details__icon' }), jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__wallet-card__wallet-details__rows', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small',
|
|
329
|
+
}), variant: 'body_normal', weight: 'medium', children: t('dyn_wallet_funding.from_external_wallet.funding_view.balance_error') })] }), jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__wallet-card', children: [jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__wallet-card__wallet-details', children: [jsxRuntime.jsx(walletBook.WalletIcon, { icon: externalWallet.connector.metadata.icon, walletKey: externalWallet.connector.key, className: 'fund-from-wallet__content__wallet-card__wallet-details__icon' }), jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__wallet-card__wallet-details__rows', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'medium', children: t('dyn_wallet_funding.from_external_wallet.funding_view.wallet_detail_from') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', weight: 'medium', children: shortenWalletAddress.shortenWalletAddress(externalWallet.address) })] })] }), tokenBalancesLoading && (jsxRuntime.jsx(Skeleton.Skeleton, { dataTestId: 'balance-skeleton', container: {
|
|
289
330
|
className: 'fund-from-wallet__content__wallet-card__balance-skeleton',
|
|
290
331
|
} })), !tokenBalancesLoading && (jsxRuntime.jsxs("div", { className: classNames.classNames('fund-from-wallet__content__wallet-card__balance', {
|
|
291
332
|
'fund-from-wallet__content__wallet-card__balance--disable-select': disableTokenSelect,
|
|
292
|
-
}), onClick: () => !disableTokenSelect && setShowTokenSelect(true), children: [jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__wallet-card__balance__rows', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small',
|
|
293
|
-
maxDecimals:
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
333
|
+
}), onClick: () => !disableTokenSelect && setShowTokenSelect(true), children: [jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__wallet-card__balance__rows', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', "data-testid": `primary-balance-amount-${primaryBalance.symbol}`, weight: 'medium', children: formatValue.formatValue({
|
|
334
|
+
maxDecimals: isFiatToken.isFiatOrStablecoin(primaryBalance.symbol)
|
|
335
|
+
? 2
|
|
336
|
+
: 6,
|
|
337
|
+
symbol: primaryBalance.symbol,
|
|
338
|
+
value: (_h = primaryBalance.value) !== null && _h !== void 0 ? _h : consts.UNAVAILABLE_VALUE,
|
|
339
|
+
withFixedZeros: isFiatToken.isFiatOrStablecoin(primaryBalance.symbol),
|
|
340
|
+
}) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', "data-testid": `secondary-balance-amount-${secondaryBalance.symbol}`, color: 'secondary', weight: 'medium', children: formatValue.formatValue({
|
|
341
|
+
maxDecimals: isFiatToken.isFiatOrStablecoin(secondaryBalance.symbol)
|
|
342
|
+
? 2
|
|
343
|
+
: 6,
|
|
344
|
+
symbol: secondaryBalance.symbol,
|
|
345
|
+
value: (_j = secondaryBalance.value) !== null && _j !== void 0 ? _j : consts.UNAVAILABLE_VALUE,
|
|
346
|
+
withFixedZeros: isFiatToken.isFiatOrStablecoin(secondaryBalance.symbol),
|
|
347
|
+
}) })] }), !disableTokenSelect && (jsxRuntime.jsx(Icon.Icon, { color: 'text-tertiary', size: 'small', className: 'fund-from-wallet__content__wallet-card__balance__icon', children: jsxRuntime.jsx(chevronDown.ReactComponent, { "data-testid": 'token-select-dropdown' }) }))] }))] })] }), jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'confirm-button', buttonVariant: 'brand-primary', buttonPadding: 'large', typographyProps: { color: 'white' }, className: 'fund-from-wallet__confirm-button', disabled: disableSubmit, onClick: () => handleSubmit({
|
|
298
348
|
externalWallet,
|
|
299
349
|
tokenAmount,
|
|
300
350
|
tokenBalances,
|
package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/ReceiveExternalWalletFunds.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { useState } from 'react';
|
|
3
|
+
import { useState, useCallback } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { WalletIcon } from '@dynamic-labs/wallet-book';
|
|
6
6
|
import { classNames } from '../../../../utils/functions/classNames/classNames.js';
|
|
@@ -43,7 +43,6 @@ import '../../../../utils/functions/compareChains/compareChains.js';
|
|
|
43
43
|
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
44
44
|
import '../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
|
|
45
45
|
import 'bs58';
|
|
46
|
-
import { usePromise } from '../../../../utils/hooks/usePromise/usePromise.js';
|
|
47
46
|
import '@dynamic-labs/types';
|
|
48
47
|
import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
49
48
|
import '../../../../context/LoadingContext/LoadingContext.js';
|
|
@@ -56,6 +55,7 @@ import '../../../../context/FieldsStateContext/FieldsStateContext.js';
|
|
|
56
55
|
import '../../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
57
56
|
import '@dynamic-labs/rpc-providers';
|
|
58
57
|
import '../../../../store/state/loadingAndLifecycle.js';
|
|
58
|
+
import '@dynamic-labs/store';
|
|
59
59
|
import '../../../../store/state/walletOptions/walletOptions.js';
|
|
60
60
|
import { Typography } from '../../../../components/Typography/Typography.js';
|
|
61
61
|
import '../../../../context/FooterAnimationContext/index.js';
|
|
@@ -73,6 +73,7 @@ import { Icon } from '../../../../components/Icon/Icon.js';
|
|
|
73
73
|
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
74
74
|
import { IconButton } from '../../../../components/IconButton/IconButton.js';
|
|
75
75
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
76
|
+
import { Image } from '../../../../components/Image/Image.js';
|
|
76
77
|
import { TypographyButton } from '../../../../components/TypographyButton/TypographyButton.js';
|
|
77
78
|
import 'formik';
|
|
78
79
|
import '../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
@@ -98,18 +99,19 @@ import '../../../../components/InlineWidget/InlineWidget.js';
|
|
|
98
99
|
import '../../../../components/IsBrowser/IsBrowser.js';
|
|
99
100
|
import '../../../../components/Popper/Popper/Popper.js';
|
|
100
101
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
101
|
-
import { getExchangeRates } from '../../../../data/api/exchangeRates/exchangeRates.js';
|
|
102
102
|
import { FormattedInput } from './FormattedInput/FormattedInput.js';
|
|
103
103
|
import { createFormattedInputEmitter } from './FormattedInput/formattedInputEmitter.js';
|
|
104
104
|
import { TokenSelectScreen } from './TokenSelectScreen/TokenSelectScreen.js';
|
|
105
105
|
import { UNAVAILABLE_VALUE } from './consts.js';
|
|
106
106
|
import { convertFromFiat, convertToFiat } from './utils/convert/convert.js';
|
|
107
107
|
import { formatValue } from './utils/formatValue/formatValue.js';
|
|
108
|
-
import { isFiatToken } from './utils/isFiatToken/isFiatToken.js';
|
|
108
|
+
import { isFiatOrStablecoin, isFiatToken } from './utils/isFiatToken/isFiatToken.js';
|
|
109
109
|
import { isNonZero } from './utils/isNonZero/isNonZero.js';
|
|
110
110
|
import { respectsMinimum } from './utils/respectsMinimum/respectsMinimum.js';
|
|
111
|
+
import { useExchangeRatesForFunding } from './utils/useExchangeRatesForFunding/useExchangeRatesForFunding.js';
|
|
111
112
|
import { useSubmitExternalWalletFunding } from './utils/useSubmitExternalWalletFunding/useSubmitExternalWalletFunding.js';
|
|
112
113
|
import { useTokensForFunding } from './utils/useTokensForFunding/useTokensForFunding.js';
|
|
114
|
+
import { calculateFiatBalance } from './utils/calculateFiatBalance/calculateFiatBalance.js';
|
|
113
115
|
|
|
114
116
|
const defaultQuickSuggestions = {
|
|
115
117
|
token: 'USD',
|
|
@@ -119,7 +121,7 @@ const rulesThatHideQuickSuggestions = ['exact', 'minimum'];
|
|
|
119
121
|
const rulesThatDisableTokenSelect = ['exact', 'exact-with-amount'];
|
|
120
122
|
const inputEmitter = createFormattedInputEmitter();
|
|
121
123
|
const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialTokenRaw, externalWallet, quickSuggestions = defaultQuickSuggestions, }) => {
|
|
122
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
124
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
123
125
|
// For now we hardcode the default value, soon we will fetch this from project settings
|
|
124
126
|
const initialToken = initialTokenRaw !== null && initialTokenRaw !== void 0 ? initialTokenRaw : {
|
|
125
127
|
rule: 'recommended',
|
|
@@ -142,10 +144,9 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
|
|
|
142
144
|
const { isLoading: tokenBalancesLoading, tokens: tokenBalances } = useTokensForFunding({
|
|
143
145
|
wallet: externalWallet,
|
|
144
146
|
});
|
|
145
|
-
const
|
|
146
|
-
initialData: {},
|
|
147
|
+
const exchangeRates = useExchangeRatesForFunding({
|
|
147
148
|
// Initialize amounts after exchange rates are fetched
|
|
148
|
-
|
|
149
|
+
onFetch: (exchangeRates) => {
|
|
149
150
|
if (tokenAmount === undefined && fiatAmount !== undefined) {
|
|
150
151
|
setTokenAmount(convertFromFiat(fiatAmount, tokenSymbol, exchangeRates));
|
|
151
152
|
}
|
|
@@ -153,37 +154,44 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
|
|
|
153
154
|
setFiatAmount(convertToFiat(tokenAmount, tokenSymbol, exchangeRates));
|
|
154
155
|
}
|
|
155
156
|
},
|
|
157
|
+
tokenBalances,
|
|
156
158
|
});
|
|
157
159
|
const [tokenAmount, setTokenAmount] = useState(isInitialAmountValueForToken
|
|
158
160
|
? (_a = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _a !== void 0 ? _a : ''
|
|
159
161
|
: convertFromFiat((_b = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _b !== void 0 ? _b : '', initialToken.value, exchangeRates));
|
|
160
162
|
const [tokenSymbol, _setTokenSymbol] = useState(initialToken.value);
|
|
161
|
-
const
|
|
163
|
+
const [fiatAmount, setFiatAmount] = useState(isInitialAmountValueForToken
|
|
164
|
+
? convertToFiat(tokenAmount !== null && tokenAmount !== void 0 ? tokenAmount : '', tokenSymbol, exchangeRates)
|
|
165
|
+
: (_c = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _c !== void 0 ? _c : '');
|
|
166
|
+
const setTokenSymbol = useCallback((symbol) => {
|
|
162
167
|
setHasUserInteracted(true);
|
|
163
168
|
_setTokenSymbol(symbol);
|
|
164
169
|
if (fiatAmount)
|
|
165
170
|
setTokenAmount(convertFromFiat(fiatAmount, symbol, exchangeRates));
|
|
166
|
-
};
|
|
167
|
-
const [fiatAmount, setFiatAmount] = useState(isInitialAmountValueForToken
|
|
168
|
-
? convertToFiat(tokenAmount !== null && tokenAmount !== void 0 ? tokenAmount : '', tokenSymbol, exchangeRates)
|
|
169
|
-
: (_c = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _c !== void 0 ? _c : '');
|
|
171
|
+
}, [fiatAmount, exchangeRates]);
|
|
170
172
|
// When we eventually allow changing this, add setter as _setFiatSymbol
|
|
171
173
|
// And then create a setFiatSymbol function similar to how we have setTokenSymbol
|
|
172
174
|
const [fiatSymbol] = useState('USD');
|
|
173
|
-
const setAmountsByTokenValue = (amount) => {
|
|
175
|
+
const setAmountsByTokenValue = useCallback((amount) => {
|
|
174
176
|
setTokenAmount(amount);
|
|
175
177
|
setFiatAmount(convertToFiat(amount, tokenSymbol, exchangeRates));
|
|
176
|
-
};
|
|
177
|
-
const setAmountsByFiatValue = (amount) => {
|
|
178
|
+
}, [tokenSymbol, exchangeRates]);
|
|
179
|
+
const setAmountsByFiatValue = useCallback((amount) => {
|
|
178
180
|
setFiatAmount(amount);
|
|
179
181
|
setTokenAmount(convertFromFiat(amount, tokenSymbol, exchangeRates));
|
|
180
|
-
};
|
|
182
|
+
}, [tokenSymbol, exchangeRates]);
|
|
181
183
|
const [showTokenAsPrimary, setShowTokenAsPrimary] = useState(false);
|
|
182
|
-
const switchPrimaryAndSecondary = () => {
|
|
184
|
+
const switchPrimaryAndSecondary = useCallback(() => {
|
|
183
185
|
setHasUserInteracted(true);
|
|
184
186
|
setShowTokenAsPrimary(!showTokenAsPrimary);
|
|
187
|
+
if (tokenAmount && isNaN(parseFloat(tokenAmount))) {
|
|
188
|
+
setTokenAmount('');
|
|
189
|
+
}
|
|
190
|
+
if (fiatAmount && isNaN(parseFloat(fiatAmount))) {
|
|
191
|
+
setFiatAmount('');
|
|
192
|
+
}
|
|
185
193
|
inputEmitter.emit('focus');
|
|
186
|
-
};
|
|
194
|
+
}, [fiatAmount, showTokenAsPrimary, tokenAmount]);
|
|
187
195
|
const isMinimumRespected = minimum
|
|
188
196
|
? respectsMinimum({ token: fiatSymbol, value: fiatAmount !== null && fiatAmount !== void 0 ? fiatAmount : '' }, minimum, exchangeRates)
|
|
189
197
|
: true;
|
|
@@ -204,11 +212,11 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
|
|
|
204
212
|
},
|
|
205
213
|
{ amount: tokenAmount, symbol: tokenSymbol },
|
|
206
214
|
];
|
|
207
|
-
const secondaryDisplayHasFixedZeros = isFiatToken(secondaryData.symbol) || secondaryData.symbol === 'USDC';
|
|
208
215
|
const secondaryDisplay = formatValue({
|
|
216
|
+
maxDecimals: isFiatOrStablecoin(secondaryData.symbol) ? 2 : undefined,
|
|
209
217
|
symbol: secondaryData.symbol,
|
|
210
218
|
value: secondaryData.amount,
|
|
211
|
-
withFixedZeros:
|
|
219
|
+
withFixedZeros: isFiatOrStablecoin(secondaryData.symbol),
|
|
212
220
|
});
|
|
213
221
|
const quickSuggestionsWithToken = Array.isArray(quickSuggestions)
|
|
214
222
|
? { token: 'USD', values: quickSuggestions }
|
|
@@ -223,10 +231,33 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
|
|
|
223
231
|
value,
|
|
224
232
|
}))
|
|
225
233
|
.filter(({ display }) => display !== undefined);
|
|
226
|
-
const
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
|
|
234
|
+
const currentToken = tokenBalances === null || tokenBalances === void 0 ? void 0 : tokenBalances.find(({ symbol }) => symbol === tokenSymbol);
|
|
235
|
+
const fiatBalance = calculateFiatBalance(currentToken, exchangeRates);
|
|
236
|
+
const [primaryBalance, secondaryBalance] = showTokenAsPrimary
|
|
237
|
+
? [
|
|
238
|
+
{
|
|
239
|
+
symbol: tokenSymbol,
|
|
240
|
+
value: (_d = currentToken === null || currentToken === void 0 ? void 0 : currentToken.balance) !== null && _d !== void 0 ? _d : 0,
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
symbol: fiatSymbol,
|
|
244
|
+
value: fiatBalance,
|
|
245
|
+
},
|
|
246
|
+
]
|
|
247
|
+
: [
|
|
248
|
+
{
|
|
249
|
+
symbol: fiatSymbol,
|
|
250
|
+
value: fiatBalance,
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
symbol: tokenSymbol,
|
|
254
|
+
value: (_e = currentToken === null || currentToken === void 0 ? void 0 : currentToken.balance) !== null && _e !== void 0 ? _e : 0,
|
|
255
|
+
},
|
|
256
|
+
];
|
|
257
|
+
const showNotEnoughBalance = Boolean(!currentToken ||
|
|
258
|
+
(isNonZero(tokenAmount) &&
|
|
259
|
+
tokenAmount !== undefined &&
|
|
260
|
+
currentToken.balance < parseFloat(tokenAmount)));
|
|
230
261
|
const showMinimumRequired = Boolean(!isMinimumRespected && !showNotEnoughBalance);
|
|
231
262
|
const showQuickSuggestions = quickSuggestionsParsed.length > 0 &&
|
|
232
263
|
!hasUserInteracted &&
|
|
@@ -235,62 +266,81 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
|
|
|
235
266
|
isFiatToken(quickSuggestionsWithToken.token));
|
|
236
267
|
const disableTokenSelect = rulesThatDisableTokenSelect.includes(initialToken.rule);
|
|
237
268
|
const [showTokenSelect, setShowTokenSelect] = useState(false);
|
|
238
|
-
const handleSelectToken = (token) => {
|
|
269
|
+
const handleSelectToken = useCallback((token) => {
|
|
239
270
|
setTokenSymbol(token);
|
|
240
271
|
setShowTokenSelect(false);
|
|
241
|
-
};
|
|
242
|
-
const handleQuickSuggestion = (value) => {
|
|
272
|
+
}, [setTokenSymbol]);
|
|
273
|
+
const handleQuickSuggestion = useCallback((value) => {
|
|
243
274
|
setHasUserInteracted(true);
|
|
244
275
|
if (isFiatToken(quickSuggestionsWithToken.token))
|
|
245
276
|
setAmountsByFiatValue(value.toString());
|
|
246
277
|
else
|
|
247
278
|
setAmountsByTokenValue(value.toString());
|
|
248
279
|
inputEmitter.emit('focus');
|
|
249
|
-
}
|
|
280
|
+
}, [
|
|
281
|
+
quickSuggestionsWithToken.token,
|
|
282
|
+
setAmountsByFiatValue,
|
|
283
|
+
setAmountsByTokenValue,
|
|
284
|
+
]);
|
|
250
285
|
const handleSubmit = useSubmitExternalWalletFunding();
|
|
286
|
+
const disableSubmit = !isMinimumRespected || showNotEnoughBalance || !isNonZero(tokenAmount);
|
|
287
|
+
const closeTokenSelect = useCallback(() => {
|
|
288
|
+
setShowTokenSelect(false);
|
|
289
|
+
inputEmitter.emit('focus');
|
|
290
|
+
}, []);
|
|
251
291
|
const grayOutSecondaryDisplay = !isNonZero(secondaryData.amount) ||
|
|
252
|
-
(
|
|
292
|
+
(isFiatOrStablecoin(secondaryData.symbol) &&
|
|
253
293
|
parseFloat((_f = secondaryData.amount) !== null && _f !== void 0 ? _f : '0') < 0.0099);
|
|
254
294
|
const inputSymbolProp = primaryData.symbol === 'USD'
|
|
255
295
|
? { leading: '$' }
|
|
256
296
|
: { trailing: primaryData.symbol };
|
|
257
297
|
const backButton = (jsx(IconButton, { type: 'button', id: 'back-button', "data-testid": 'back-button', onClick: () => setDynamicWidgetView('choose-wallet-funding-method'), children: jsx(SvgArrowLeft, {}) }));
|
|
258
|
-
return (jsxs("div", { className: 'fund-from-wallet', children: [!disableTokenSelect && (jsx(TokenSelectScreen, { onClose:
|
|
298
|
+
return (jsxs("div", { className: 'fund-from-wallet', children: [!disableTokenSelect && (jsx(TokenSelectScreen, { onClose: closeTokenSelect, onSelectToken: handleSelectToken, tokens: tokenBalances !== null && tokenBalances !== void 0 ? tokenBalances : [], currentToken: tokenSymbol, className: classNames('fund-from-wallet__token-select', {
|
|
259
299
|
'fund-from-wallet__token-select--open': showTokenSelect,
|
|
260
|
-
}) })), jsx(ModalHeader, { leading: backButton, children: jsx(Typography, { variant: 'title', children: t('dyn_wallet_funding.from_external_wallet.funding_view.title') }) }), jsxs("div", { className: 'fund-from-wallet__content', children: [jsxs("div", { className: 'fund-from-wallet__content__amount-container', children: [minimum && (jsx(Typography, { color: 'error-1', className: classNames('fund-from-wallet__content__amount-container__minimum-error', {
|
|
300
|
+
}), showTokenAsPrimary: showTokenAsPrimary, exchangeRates: exchangeRates })), jsx(ModalHeader, { leading: backButton, children: jsx(Typography, { variant: 'title', children: t('dyn_wallet_funding.from_external_wallet.funding_view.title') }) }), jsxs("div", { className: 'fund-from-wallet__content', children: [jsxs("div", { className: 'fund-from-wallet__content__amount-container', children: [minimum && (jsx(Typography, { color: 'error-1', className: classNames('fund-from-wallet__content__amount-container__minimum-error', {
|
|
261
301
|
'fund-from-wallet__content__amount-container__minimum-error--visible': showMinimumRequired,
|
|
262
|
-
}), variant: 'body_normal', children: t('dyn_wallet_funding.from_external_wallet.funding_view.minimum_error', {
|
|
302
|
+
}), variant: 'body_normal', weight: 'medium', children: t('dyn_wallet_funding.from_external_wallet.funding_view.minimum_error', {
|
|
263
303
|
minimum: formatValue({
|
|
264
304
|
symbol: minimum.token,
|
|
265
305
|
value: minimum.value,
|
|
266
306
|
}),
|
|
267
307
|
}) })), primaryData.amount !== undefined && (jsx(FormattedInput, Object.assign({ className: 'fund-from-wallet__content__amount-container__amount', value: (initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.rule) === 'exact'
|
|
268
308
|
? (_g = formatValue({
|
|
269
|
-
maxDecimals:
|
|
309
|
+
maxDecimals: isFiatOrStablecoin(primaryData.symbol)
|
|
310
|
+
? 2
|
|
311
|
+
: 8,
|
|
270
312
|
symbol: undefined,
|
|
271
313
|
value: primaryData.amount,
|
|
272
|
-
withFixedZeros:
|
|
273
|
-
primaryData.symbol === 'USDC',
|
|
314
|
+
withFixedZeros: isFiatOrStablecoin(primaryData.symbol),
|
|
274
315
|
})) !== null && _g !== void 0 ? _g : primaryData.amount
|
|
275
316
|
: primaryData.amount, onChange: primaryData.setAmount, emitter: inputEmitter, onInteraction: () => setHasUserInteracted(true), locked: (initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.rule) === 'exact' }, inputSymbolProp))), primaryData.amount === undefined && (jsx(Skeleton, { dataTestId: 'primary-amount-skeleton', container: {
|
|
276
317
|
className: 'fund-from-wallet__content__amount-container__skeleton',
|
|
277
|
-
} })), showQuickSuggestions && (jsx("div", { className: 'fund-from-wallet__content__amount-container__quick-suggestions', children: quickSuggestionsParsed.map(({ display, value }) => (jsx(Typography, { variant: 'body_small', color: 'secondary', onClick: () => handleQuickSuggestion(value), children: display }, value))) })), !showQuickSuggestions && secondaryDisplay && (jsxs("div", { className: 'fund-from-wallet__content__amount-container__secondary-amount-container', children: [jsx(Typography, { weight: 'medium', className: classNames('fund-from-wallet__content__amount-container__secondary-amount-container__amount', {
|
|
318
|
+
} })), showQuickSuggestions && (jsx("div", { className: 'fund-from-wallet__content__amount-container__quick-suggestions', children: quickSuggestionsParsed.map(({ display, value }) => (jsx(Typography, { variant: 'body_small', color: 'secondary', onClick: () => handleQuickSuggestion(value), weight: 'medium', children: display }, value))) })), !showQuickSuggestions && secondaryDisplay && (jsxs("div", { className: 'fund-from-wallet__content__amount-container__secondary-amount-container', children: [(currentToken === null || currentToken === void 0 ? void 0 : currentToken.logoURI) ? (jsx(Image, { dataTestId: 'token-icon', alt: tokenSymbol, src: currentToken.logoURI, className: 'fund-from-wallet__content__token-icon' })) : null, jsx(Typography, { weight: 'medium', className: classNames('fund-from-wallet__content__amount-container__secondary-amount-container__amount', {
|
|
278
319
|
'fund-from-wallet__content__amount-container__secondary-amount-container__amount--grayed-out': grayOutSecondaryDisplay,
|
|
279
320
|
}), children: secondaryDisplay }), jsx(Icon, { size: 'small', color: 'text-secondary', className: 'fund-from-wallet__content__amount-container__secondary-amount-container__switch', children: jsx(SvgSwitchToggle, { "data-testid": 'switch-primary-and-secondary', onClick: switchPrimaryAndSecondary }) })] })), !showQuickSuggestions && !secondaryDisplay && (jsxs("div", { className: 'fund-from-wallet__content__amount-container__secondary-missing', children: [jsx(Typography, { weight: 'medium', children: formatValue({
|
|
280
321
|
symbol: secondaryData.symbol,
|
|
281
322
|
value: UNAVAILABLE_VALUE,
|
|
282
|
-
}) }), jsx("div", { ref: setConversionErrorIconRef, children: jsx(Icon, { size: 'medium', color: 'text-tertiary', children: jsx(SvgFooterInfoIcon, {}) }) }), jsx(Tooltip, { content: t('dyn_wallet_funding.from_external_wallet.funding_view.
|
|
323
|
+
}) }), jsx("div", { ref: setConversionErrorIconRef, children: jsx(Icon, { size: 'medium', color: 'text-tertiary', children: jsx(SvgFooterInfoIcon, {}) }) }), jsx(Tooltip, { content: t('dyn_wallet_funding.from_external_wallet.funding_view.pricing_unavailable'), targetRef: conversionErrorIconRef, className: 'fund-from-wallet__content__amount-container__secondary-missing__tooltip' })] })), jsx(Typography, { color: 'error-1', className: classNames('fund-from-wallet__content__amount-container__balance-error', {
|
|
283
324
|
'fund-from-wallet__content__amount-container__balance-error--visible': showNotEnoughBalance,
|
|
284
|
-
}), variant: 'body_normal', children: t('dyn_wallet_funding.from_external_wallet.funding_view.balance_error') })] }), jsxs("div", { className: 'fund-from-wallet__content__wallet-card', children: [jsxs("div", { className: 'fund-from-wallet__content__wallet-card__wallet-details', children: [jsx(WalletIcon, { icon: externalWallet.connector.metadata.icon, walletKey: externalWallet.connector.key, className: 'fund-from-wallet__content__wallet-card__wallet-details__icon' }), jsxs("div", { className: 'fund-from-wallet__content__wallet-card__wallet-details__rows', children: [jsx(Typography, { variant: 'body_small',
|
|
325
|
+
}), variant: 'body_normal', weight: 'medium', children: t('dyn_wallet_funding.from_external_wallet.funding_view.balance_error') })] }), jsxs("div", { className: 'fund-from-wallet__content__wallet-card', children: [jsxs("div", { className: 'fund-from-wallet__content__wallet-card__wallet-details', children: [jsx(WalletIcon, { icon: externalWallet.connector.metadata.icon, walletKey: externalWallet.connector.key, className: 'fund-from-wallet__content__wallet-card__wallet-details__icon' }), jsxs("div", { className: 'fund-from-wallet__content__wallet-card__wallet-details__rows', children: [jsx(Typography, { variant: 'body_small', weight: 'medium', children: t('dyn_wallet_funding.from_external_wallet.funding_view.wallet_detail_from') }), jsx(Typography, { variant: 'body_small', color: 'secondary', weight: 'medium', children: shortenWalletAddress(externalWallet.address) })] })] }), tokenBalancesLoading && (jsx(Skeleton, { dataTestId: 'balance-skeleton', container: {
|
|
285
326
|
className: 'fund-from-wallet__content__wallet-card__balance-skeleton',
|
|
286
327
|
} })), !tokenBalancesLoading && (jsxs("div", { className: classNames('fund-from-wallet__content__wallet-card__balance', {
|
|
287
328
|
'fund-from-wallet__content__wallet-card__balance--disable-select': disableTokenSelect,
|
|
288
|
-
}), onClick: () => !disableTokenSelect && setShowTokenSelect(true), children: [jsxs("div", { className: 'fund-from-wallet__content__wallet-card__balance__rows', children: [jsx(Typography, { variant: 'body_small',
|
|
289
|
-
maxDecimals:
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
329
|
+
}), onClick: () => !disableTokenSelect && setShowTokenSelect(true), children: [jsxs("div", { className: 'fund-from-wallet__content__wallet-card__balance__rows', children: [jsx(Typography, { variant: 'body_small', "data-testid": `primary-balance-amount-${primaryBalance.symbol}`, weight: 'medium', children: formatValue({
|
|
330
|
+
maxDecimals: isFiatOrStablecoin(primaryBalance.symbol)
|
|
331
|
+
? 2
|
|
332
|
+
: 6,
|
|
333
|
+
symbol: primaryBalance.symbol,
|
|
334
|
+
value: (_h = primaryBalance.value) !== null && _h !== void 0 ? _h : UNAVAILABLE_VALUE,
|
|
335
|
+
withFixedZeros: isFiatOrStablecoin(primaryBalance.symbol),
|
|
336
|
+
}) }), jsx(Typography, { variant: 'body_small', "data-testid": `secondary-balance-amount-${secondaryBalance.symbol}`, color: 'secondary', weight: 'medium', children: formatValue({
|
|
337
|
+
maxDecimals: isFiatOrStablecoin(secondaryBalance.symbol)
|
|
338
|
+
? 2
|
|
339
|
+
: 6,
|
|
340
|
+
symbol: secondaryBalance.symbol,
|
|
341
|
+
value: (_j = secondaryBalance.value) !== null && _j !== void 0 ? _j : UNAVAILABLE_VALUE,
|
|
342
|
+
withFixedZeros: isFiatOrStablecoin(secondaryBalance.symbol),
|
|
343
|
+
}) })] }), !disableTokenSelect && (jsx(Icon, { color: 'text-tertiary', size: 'small', className: 'fund-from-wallet__content__wallet-card__balance__icon', children: jsx(SvgChevronDown, { "data-testid": 'token-select-dropdown' }) }))] }))] })] }), jsx(TypographyButton, { dataTestId: 'confirm-button', buttonVariant: 'brand-primary', buttonPadding: 'large', typographyProps: { color: 'white' }, className: 'fund-from-wallet__confirm-button', disabled: disableSubmit, onClick: () => handleSubmit({
|
|
294
344
|
externalWallet,
|
|
295
345
|
tokenAmount,
|
|
296
346
|
tokenBalances,
|