@dynamic-labs/sdk-react-core 2.0.0-alpha.3 → 2.0.0-alpha.5
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 +39 -0
- package/package.cjs +4 -3
- package/package.js +4 -3
- package/package.json +16 -13
- package/src/index.cjs +47 -34
- package/src/index.js +29 -21
- package/src/lib/Main.cjs +12 -8
- package/src/lib/Main.js +12 -8
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +12 -8
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +12 -8
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +12 -8
- package/src/lib/components/AnimatePresence/AnimatePresence.js +12 -8
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +16 -8
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +16 -8
- package/src/lib/components/Captcha/Captcha.cjs +12 -8
- package/src/lib/components/Captcha/Captcha.js +12 -8
- package/src/lib/components/ChainIcon/ChainIcon.cjs +27 -0
- package/src/lib/components/ChainIcon/ChainIcon.d.ts +8 -0
- package/src/lib/components/ChainIcon/ChainIcon.js +23 -0
- package/src/lib/components/ChainIcon/index.d.ts +1 -0
- package/src/lib/components/Divider/Divider.cjs +11 -7
- package/src/lib/components/Divider/Divider.js +11 -7
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +12 -8
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +12 -8
- package/src/lib/components/EmailIcon/EmailIcon.cjs +14 -0
- package/src/lib/components/EmailIcon/EmailIcon.d.ts +2 -0
- package/src/lib/components/EmailIcon/EmailIcon.js +10 -0
- package/src/lib/components/EmailIcon/index.d.ts +1 -0
- package/src/lib/components/IconWithSpinner/IconWithSpinner.cjs +2 -0
- package/src/lib/components/IconWithSpinner/IconWithSpinner.js +2 -0
- package/src/lib/components/IconWithSpinner/Indicator/Indicator.cjs +2 -0
- package/src/lib/components/IconWithSpinner/Indicator/Indicator.js +2 -0
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.cjs +2 -0
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.js +2 -0
- package/src/lib/components/IconWithStatus/IconWithStatus.cjs +2 -0
- package/src/lib/components/IconWithStatus/IconWithStatus.js +2 -0
- package/src/lib/components/InlineSubmitButton/InlineSubmitButton.cjs +89 -0
- package/src/lib/components/InlineSubmitButton/InlineSubmitButton.d.ts +10 -0
- package/src/lib/components/InlineSubmitButton/InlineSubmitButton.js +85 -0
- package/src/lib/components/InlineSubmitButton/index.d.ts +1 -0
- package/src/lib/components/Input/Input.cjs +9 -6
- package/src/lib/components/Input/Input.d.ts +13 -2
- package/src/lib/components/Input/Input.js +9 -6
- package/src/lib/components/Input/Input.types.d.ts +1 -0
- package/src/lib/components/LogoutButton/LogoutButton.cjs +12 -8
- package/src/lib/components/LogoutButton/LogoutButton.js +12 -8
- package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +12 -8
- package/src/lib/components/MenuList/Dropdown/Dropdown.js +12 -8
- package/src/lib/components/MenuList/MenuList/MenuList.cjs +2 -2
- package/src/lib/components/MenuList/MenuList/MenuList.js +2 -2
- package/src/lib/components/MenuList/index.d.ts +1 -0
- package/src/lib/components/Modal/Modal.cjs +12 -8
- package/src/lib/components/Modal/Modal.js +12 -8
- package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +12 -8
- package/src/lib/components/NeedHelpSection/NeedHelpSection.js +12 -8
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +15 -11
- package/src/lib/components/NetworkPicker/NetworkPicker.d.ts +2 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.js +15 -11
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +11 -7
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +11 -7
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +11 -7
- package/src/lib/components/NetworkPicker/components/Network/Network.js +11 -7
- package/src/lib/components/NetworkPicker/components/NetworkControlSkeleton/NetworkControlSkeleton.cjs +70 -1
- package/src/lib/components/NetworkPicker/components/NetworkControlSkeleton/NetworkControlSkeleton.js +71 -2
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +12 -8
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +12 -8
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +13 -19
- package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +7 -4
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +13 -19
- package/src/lib/components/OverlayCard/OverlayCard.cjs +31 -24
- package/src/lib/components/OverlayCard/OverlayCard.d.ts +0 -1
- package/src/lib/components/OverlayCard/OverlayCard.js +31 -24
- package/src/lib/components/OverlayCard/OverlayCardTarget/OverlayCardTarget.cjs +46 -0
- package/src/lib/components/OverlayCard/OverlayCardTarget/OverlayCardTarget.d.ts +17 -0
- package/src/lib/components/OverlayCard/OverlayCardTarget/OverlayCardTarget.js +40 -0
- package/src/lib/components/OverlayCard/OverlayCardTarget/index.d.ts +1 -0
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs +11 -7
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js +11 -7
- package/src/lib/components/PhoneIcon/PhoneIcon.d.ts +2 -0
- package/src/lib/components/PhoneIcon/index.d.ts +1 -0
- package/src/lib/components/Portal/Portal.cjs +13 -8
- package/src/lib/components/Portal/Portal.js +13 -8
- package/src/lib/components/PoweredByDynamic/PoweredByDynamic.cjs +12 -8
- package/src/lib/components/PoweredByDynamic/PoweredByDynamic.js +12 -8
- package/src/lib/components/RenderView/RenderView.cjs +10 -7
- package/src/lib/components/RenderView/RenderView.js +10 -7
- package/src/lib/components/RetrySendVerificationCodeSection/RetrySendVerificationCodeSection.cjs +12 -8
- package/src/lib/components/RetrySendVerificationCodeSection/RetrySendVerificationCodeSection.js +12 -8
- package/src/lib/components/{SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.cjs → SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.cjs} +14 -10
- package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.d.ts +6 -0
- package/src/lib/components/{SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.js → SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.js} +14 -10
- package/src/lib/components/SecureEmbeddedWalletCard/index.d.ts +1 -0
- package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +4 -2
- package/src/lib/components/SendBalanceForm/SendBalanceForm.d.ts +1 -0
- package/src/lib/components/SendBalanceForm/SendBalanceForm.js +4 -2
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +3 -3
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.d.ts +1 -0
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +3 -3
- package/src/lib/components/ShadowDOM/ShadowDOM.cjs +12 -8
- package/src/lib/components/ShadowDOM/ShadowDOM.js +12 -8
- package/src/lib/components/Skeleton/Skeleton.cjs +2 -2
- package/src/lib/components/Skeleton/Skeleton.d.ts +2 -1
- package/src/lib/components/Skeleton/Skeleton.js +2 -2
- package/src/lib/components/SocialSignIn/SocialSignIn.cjs +15 -11
- package/src/lib/components/SocialSignIn/SocialSignIn.js +15 -11
- package/src/lib/components/{SyncPasskeyFlow/SyncPasskeyFlow.cjs → SyncEmbeddedWalletAuthFlow/SyncEmbeddedWalletAuthFlow.cjs} +14 -10
- package/src/lib/components/SyncEmbeddedWalletAuthFlow/SyncEmbeddedWalletAuthFlow.d.ts +1 -0
- package/src/lib/components/{SyncPasskeyFlow/SyncPasskeyFlow.js → SyncEmbeddedWalletAuthFlow/SyncEmbeddedWalletAuthFlow.js} +14 -10
- package/src/lib/components/SyncEmbeddedWalletAuthFlow/index.d.ts +1 -0
- package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.d.ts +8 -0
- package/src/lib/components/ToggleVisibilityButton/index.d.ts +1 -0
- package/src/lib/components/Toolkit/Toolkit.cjs +18 -14
- package/src/lib/components/Toolkit/Toolkit.js +18 -14
- package/src/lib/components/Toolkit/components/LoginWithEmailSwitch.cjs +13 -9
- package/src/lib/components/Toolkit/components/LoginWithEmailSwitch.js +13 -9
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.cjs +15 -13
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.js +15 -13
- package/src/lib/components/Tooltip/Tooltip.cjs +12 -8
- package/src/lib/components/Tooltip/Tooltip.js +12 -8
- package/src/lib/components/TosAndPp/TosAndPp.cjs +12 -8
- package/src/lib/components/TosAndPp/TosAndPp.js +12 -8
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +11 -7
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +11 -7
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +12 -8
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +12 -8
- package/src/lib/components/Transition/OpacityTransition/OpacityTransition.cjs +2 -2
- package/src/lib/components/Transition/OpacityTransition/OpacityTransition.js +2 -2
- package/src/lib/components/Transition/SlideInUpTransition/SlideInUpTransition.cjs +2 -2
- package/src/lib/components/Transition/SlideInUpTransition/SlideInUpTransition.js +2 -2
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +12 -8
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +12 -8
- package/src/lib/components/Transition/ZoomTransition/ZoomTransition.cjs +2 -2
- package/src/lib/components/Transition/ZoomTransition/ZoomTransition.js +2 -2
- package/src/lib/components/Typography/Typography.cjs +2 -2
- package/src/lib/components/Typography/Typography.js +2 -2
- package/src/lib/components/Typography/Typography.types.d.ts +2 -1
- package/src/lib/components/UserAddress/UserAddress.cjs +12 -8
- package/src/lib/components/UserAddress/UserAddress.js +12 -8
- package/src/lib/components/UserProfile/UserProfile.cjs +12 -8
- package/src/lib/components/UserProfile/UserProfile.js +12 -8
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +11 -7
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +11 -7
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs +13 -9
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js +13 -9
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +11 -7
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +11 -7
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +15 -9
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +15 -9
- package/src/lib/components/UserProfileForm/UserProfileForm.cjs +12 -8
- package/src/lib/components/UserProfileForm/UserProfileForm.js +12 -8
- package/src/lib/components/index.d.ts +10 -5
- package/src/lib/context/CaptchaContext/CaptchaContext.d.ts +1 -1
- package/src/lib/context/ConnectWithEmailOtpContext/ConnectWithEmailOtpProvider.cjs +12 -8
- package/src/lib/context/ConnectWithEmailOtpContext/ConnectWithEmailOtpProvider.js +12 -8
- package/src/lib/context/DynamicContext/DynamicContext.cjs +20 -27
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +0 -1
- package/src/lib/context/DynamicContext/DynamicContext.js +20 -27
- package/src/lib/context/DynamicContext/handleDisconnectWallet/handleDisconnectWallet.cjs +1 -4
- package/src/lib/context/DynamicContext/handleDisconnectWallet/handleDisconnectWallet.js +1 -4
- package/src/lib/context/DynamicContext/helpers/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/helpers/initRefreshAuth/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/helpers/initRefreshAuth/initRefreshAuth.cjs +55 -0
- package/src/lib/context/DynamicContext/helpers/initRefreshAuth/initRefreshAuth.d.ts +11 -0
- package/src/lib/context/DynamicContext/helpers/initRefreshAuth/initRefreshAuth.js +50 -0
- package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.cjs +3 -19
- package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.js +4 -20
- package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.types.d.ts +1 -1
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.cjs +2 -0
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.js +2 -0
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.cjs +15 -7
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.js +15 -7
- package/src/lib/context/DynamicContext/hooks/useSetShowLinkNewWalletModal/useSetShowLinkNewWalletModal.cjs +1 -1
- package/src/lib/context/DynamicContext/hooks/useSetShowLinkNewWalletModal/useSetShowLinkNewWalletModal.d.ts +1 -1
- package/src/lib/context/DynamicContext/hooks/useSetShowLinkNewWalletModal/useSetShowLinkNewWalletModal.js +1 -1
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.cjs +14 -13
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.js +14 -13
- package/src/lib/context/DynamicContext/types/index.d.ts +1 -1
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +2 -2
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +2 -2
- package/src/lib/context/DynamicContext/useDynamicContext/useOverrides/useOverrides.cjs +12 -8
- package/src/lib/context/DynamicContext/useDynamicContext/useOverrides/useOverrides.js +12 -8
- package/src/lib/context/FundingContext/FundingContext.cjs +11 -7
- package/src/lib/context/FundingContext/FundingContext.js +11 -7
- package/src/lib/context/LoadingContext/LoadingContext.cjs +12 -8
- package/src/lib/context/LoadingContext/LoadingContext.js +12 -8
- package/src/lib/context/MockContext/MockContext.cjs +9 -5
- package/src/lib/context/MockContext/MockContext.js +9 -5
- package/src/lib/context/PasskeyContext/PasskeyContext.cjs +11 -7
- package/src/lib/context/PasskeyContext/PasskeyContext.js +11 -7
- package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.cjs +12 -8
- package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.js +12 -8
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.cjs +15 -9
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.js +15 -9
- package/src/lib/context/PhoneNumberContext/PhoneNumberContext.d.ts +14 -0
- package/src/lib/context/PhoneNumberContext/index.d.ts +1 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +12 -8
- package/src/lib/context/SendBalanceContext/SendBalanceContext.js +12 -8
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +12 -8
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +12 -8
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.cjs +12 -8
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.js +12 -8
- package/src/lib/context/VerificationContext/VerificationContext.cjs +31 -0
- package/src/lib/context/VerificationContext/VerificationContext.d.ts +17 -0
- package/src/lib/context/VerificationContext/VerificationContext.js +25 -0
- package/src/lib/context/VerificationContext/index.d.ts +1 -0
- package/src/lib/context/ViewContext/types/index.d.ts +1 -1
- package/src/lib/context/WalletContext/WalletContext.cjs +24 -9
- package/src/lib/context/WalletContext/WalletContext.d.ts +8 -3
- package/src/lib/context/WalletContext/WalletContext.js +25 -11
- package/src/lib/data/api.cjs +76 -1
- package/src/lib/data/api.d.ts +25 -2
- package/src/lib/data/api.js +74 -4
- package/src/lib/events/dynamicEvents.d.ts +11 -2
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +11 -8
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +11 -8
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +11 -7
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +11 -7
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.cjs +12 -8
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.js +12 -8
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +11 -7
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +11 -7
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.cjs +11 -7
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.js +11 -7
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +11 -7
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +11 -7
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +11 -7
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +11 -7
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +13 -9
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +13 -9
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +11 -7
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +11 -7
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +12 -8
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +12 -8
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +13 -9
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +13 -9
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +18 -15
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +18 -15
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +11 -7
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +11 -7
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +13 -9
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +13 -9
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +11 -7
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +11 -7
- package/src/lib/locale/en/translation.cjs +46 -2
- package/src/lib/locale/en/translation.d.ts +45 -1
- package/src/lib/locale/en/translation.js +46 -2
- package/src/lib/main.global.cjs +1 -1
- package/src/lib/main.global.js +1 -1
- package/src/lib/modals/ConfirmationModal/ConfirmationModal.d.ts +3 -0
- package/src/lib/modals/ConfirmationModal/ConfirmationModal.types.d.ts +8 -0
- package/src/lib/modals/ConfirmationModal/index.d.ts +1 -0
- package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.cjs +11 -7
- package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.js +11 -7
- package/src/lib/modals/EnterPasswordModal/EnterPasswordModal.d.ts +3 -0
- package/src/lib/modals/EnterPasswordModal/EnterPasswordModal.types.d.ts +6 -0
- package/src/lib/modals/EnterPasswordModal/index.d.ts +1 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +12 -8
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +12 -8
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +12 -8
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +12 -8
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +13 -17
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +13 -17
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.types.d.ts +4 -5
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.cjs +11 -7
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.js +11 -7
- package/src/lib/modals/index.d.ts +2 -0
- package/src/lib/shared/assets/chevron-down.cjs +53 -0
- package/src/lib/shared/assets/chevron-down.js +29 -0
- package/src/lib/shared/assets/index.d.ts +16 -13
- package/src/lib/shared/assets/password-hero.cjs +53 -0
- package/src/lib/shared/assets/password-hero.js +29 -0
- package/src/lib/shared/assets/sign-in-with-phone.cjs +53 -0
- package/src/lib/shared/assets/sign-in-with-phone.js +29 -0
- package/src/lib/shared/types/connectionAndSignature.d.ts +15 -0
- package/src/lib/shared/types/dynamicEventsCallbacks.d.ts +48 -0
- package/src/lib/shared/types/embeddedWallets.d.ts +6 -0
- package/src/lib/shared/types/general.d.ts +5 -0
- package/src/lib/shared/types/index.d.ts +8 -220
- package/src/lib/shared/types/localStorage.d.ts +18 -0
- package/src/lib/shared/types/ui.d.ts +14 -0
- package/src/lib/shared/types/user.d.ts +15 -0
- package/src/lib/shared/types/wallets.d.ts +85 -0
- package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.cjs +9 -2
- package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.d.ts +2 -1
- package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.js +9 -2
- package/src/lib/shared/utils/functions/generateRandomPassword/generateRandomPassword.cjs +14 -0
- package/src/lib/shared/utils/functions/generateRandomPassword/generateRandomPassword.d.ts +1 -0
- package/src/lib/shared/utils/functions/generateRandomPassword/generateRandomPassword.js +10 -0
- package/src/lib/shared/utils/functions/generateRandomPassword/index.d.ts +1 -0
- package/src/lib/shared/utils/functions/index.d.ts +2 -0
- package/src/lib/shared/utils/functions/providerLabel/providerLabel.cjs +3 -0
- package/src/lib/shared/utils/functions/providerLabel/providerLabel.d.ts +1 -1
- package/src/lib/shared/utils/functions/providerLabel/providerLabel.js +3 -0
- package/src/lib/shared/utils/functions/validatePassword/index.d.ts +1 -0
- package/src/lib/shared/utils/functions/validatePassword/validatePassword.cjs +59 -0
- package/src/lib/shared/utils/functions/validatePassword/validatePassword.d.ts +13 -0
- package/src/lib/shared/utils/functions/validatePassword/validatePassword.js +55 -0
- package/src/lib/shared/utils/hooks/useThrottle/useThrottle.cjs +1 -0
- package/src/lib/shared/utils/hooks/useThrottle/useThrottle.d.ts +1 -1
- package/src/lib/shared/utils/hooks/useThrottle/useThrottle.js +1 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/localStorage.cjs +2 -0
- package/src/lib/utils/constants/localStorage.d.ts +1 -0
- package/src/lib/utils/constants/localStorage.js +2 -1
- package/src/lib/utils/constants/values.cjs +2 -0
- package/src/lib/utils/constants/values.d.ts +1 -0
- package/src/lib/utils/constants/values.js +2 -1
- package/src/lib/utils/functions/findCoinbaseMPCWallet/findCoinbaseMPCWallet.cjs +7 -0
- package/src/lib/utils/functions/findCoinbaseMPCWallet/findCoinbaseMPCWallet.d.ts +2 -0
- package/src/lib/utils/functions/findCoinbaseMPCWallet/findCoinbaseMPCWallet.js +3 -0
- package/src/lib/utils/functions/findCoinbaseMPCWallet/index.d.ts +1 -0
- package/src/lib/utils/functions/formatPhone/formatPhone.cjs +28 -0
- package/src/lib/utils/functions/formatPhone/formatPhone.d.ts +5 -0
- package/src/lib/utils/functions/formatPhone/formatPhone.js +24 -0
- package/src/lib/utils/functions/formatPhone/index.d.ts +1 -0
- package/src/lib/utils/functions/getAuthToken/getAuthToken.cjs +3 -1
- package/src/lib/utils/functions/getAuthToken/getAuthToken.js +3 -1
- package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/getCoinbaseMPCConnectorFetchers.cjs +32 -0
- package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/getCoinbaseMPCConnectorFetchers.d.ts +10 -0
- package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/getCoinbaseMPCConnectorFetchers.js +28 -0
- package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/index.d.ts +1 -0
- package/src/lib/utils/functions/getEOAWallet/getEOAWallet.cjs +38 -0
- package/src/lib/utils/functions/getEOAWallet/getEOAWallet.d.ts +3 -0
- package/src/lib/utils/functions/getEOAWallet/getEOAWallet.js +34 -0
- package/src/lib/utils/functions/getEOAWallet/index.d.ts +1 -0
- package/src/lib/utils/functions/getUserIdentifier/getUserIdentifier.cjs +43 -0
- package/src/lib/utils/functions/getUserIdentifier/getUserIdentifier.d.ts +6 -0
- package/src/lib/utils/functions/getUserIdentifier/getUserIdentifier.js +39 -0
- package/src/lib/utils/functions/getUserIdentifier/index.d.ts +1 -0
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.cjs +1 -0
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.js +1 -0
- package/src/lib/utils/functions/index.d.ts +11 -0
- package/src/lib/utils/functions/isCoinbaseWaasEnabled/index.d.ts +1 -0
- package/src/lib/utils/functions/isCoinbaseWaasEnabled/isCoinbaseWaasEnabled.cjs +13 -0
- package/src/lib/utils/functions/isCoinbaseWaasEnabled/isCoinbaseWaasEnabled.d.ts +2 -0
- package/src/lib/utils/functions/isCoinbaseWaasEnabled/isCoinbaseWaasEnabled.js +9 -0
- package/src/lib/utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.cjs +5 -4
- package/src/lib/utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.d.ts +1 -1
- package/src/lib/utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.js +5 -4
- package/src/lib/utils/functions/isPhoneNumberProviderEnabled/index.d.ts +1 -0
- package/src/lib/utils/functions/isPhoneNumberProviderEnabled/isPhoneNumberProviderEnabled.cjs +28 -0
- package/src/lib/utils/functions/isPhoneNumberProviderEnabled/isPhoneNumberProviderEnabled.d.ts +2 -0
- package/src/lib/utils/functions/isPhoneNumberProviderEnabled/isPhoneNumberProviderEnabled.js +24 -0
- package/src/lib/utils/functions/modulo/index.d.ts +1 -0
- package/src/lib/utils/functions/modulo/modulo.cjs +8 -0
- package/src/lib/utils/functions/modulo/modulo.d.ts +2 -0
- package/src/lib/utils/functions/modulo/modulo.js +4 -0
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWallet/index.d.ts +1 -0
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWallet/requiresPasswordForEmbeddedWallet.cjs +15 -0
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWallet/requiresPasswordForEmbeddedWallet.d.ts +2 -0
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWallet/requiresPasswordForEmbeddedWallet.js +11 -0
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/index.d.ts +1 -0
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/requiresPasswordForEmbeddedWalletOnSignup.cjs +35 -0
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/requiresPasswordForEmbeddedWalletOnSignup.d.ts +2 -0
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/requiresPasswordForEmbeddedWalletOnSignup.js +31 -0
- package/src/lib/utils/functions/updateUserInfo/index.d.ts +1 -0
- package/src/lib/utils/functions/updateUserInfo/updateUserInfo.cjs +18 -0
- package/src/lib/utils/functions/updateUserInfo/updateUserInfo.d.ts +1 -0
- package/src/lib/utils/functions/updateUserInfo/updateUserInfo.js +14 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +12 -8
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +12 -8
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +12 -8
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +12 -8
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +13 -9
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +13 -9
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +12 -8
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +12 -8
- package/src/lib/utils/hooks/index.d.ts +2 -1
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +12 -8
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +12 -8
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +11 -7
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +11 -7
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +15 -8
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +15 -8
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs +12 -8
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js +12 -8
- package/src/lib/utils/hooks/useConfirmationPortal/index.d.ts +1 -0
- package/src/lib/utils/hooks/useConfirmationPortal/useConfirmationPortal.d.ts +13 -0
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +1 -0
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +1 -0
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.cjs +12 -8
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.js +12 -8
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +12 -8
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +12 -8
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +12 -8
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +12 -8
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs +12 -8
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +12 -8
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +4 -0
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +4 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.cjs +12 -8
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.js +12 -8
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.cjs +13 -9
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.js +13 -9
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs +12 -8
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js +12 -8
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/index.d.ts +1 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.cjs +215 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.d.ts +5 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.js +211 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +51 -12
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.d.ts +2 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +51 -12
- package/src/lib/utils/hooks/useEmbeddedWallet/useTurnkey/useTurnkey.cjs +12 -8
- package/src/lib/utils/hooks/useEmbeddedWallet/useTurnkey/useTurnkey.js +12 -8
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/index.d.ts +1 -0
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.cjs +140 -0
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.d.ts +4 -0
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.js +136 -0
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +12 -8
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +12 -8
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.cjs +14 -13
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.js +14 -13
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.cjs +12 -8
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.js +12 -8
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs +14 -13
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js +14 -13
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +12 -8
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +12 -8
- package/src/lib/utils/hooks/useOnlyConnectedMode/useOnlyConnectedMode.cjs +12 -8
- package/src/lib/utils/hooks/useOnlyConnectedMode/useOnlyConnectedMode.js +12 -8
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +14 -13
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +14 -13
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.cjs +2 -0
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.js +2 -0
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.cjs +1 -0
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.d.ts +1 -0
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.js +1 -0
- package/src/lib/utils/hooks/useSendBalance/helpers/EVMSendBalance.cjs +43 -0
- package/src/lib/utils/hooks/useSendBalance/helpers/EVMSendBalance.d.ts +16 -0
- package/src/lib/utils/hooks/useSendBalance/helpers/EVMSendBalance.js +39 -0
- package/src/lib/utils/hooks/useSendBalance/helpers/SendBalanceBase.cjs +35 -0
- package/src/lib/utils/hooks/useSendBalance/helpers/SendBalanceBase.d.ts +21 -0
- package/src/lib/utils/hooks/useSendBalance/helpers/SendBalanceBase.js +31 -0
- package/src/lib/utils/hooks/useSendBalance/helpers/SolanaSendBalance.cjs +51 -0
- package/src/lib/utils/hooks/useSendBalance/helpers/SolanaSendBalance.d.ts +18 -0
- package/src/lib/utils/hooks/useSendBalance/helpers/SolanaSendBalance.js +47 -0
- package/src/lib/utils/hooks/useSendBalance/helpers/index.d.ts +3 -0
- package/src/lib/utils/hooks/useSendBalance/index.d.ts +1 -0
- package/src/lib/utils/hooks/useSendBalance/useSendBalance.cjs +121 -0
- package/src/lib/utils/hooks/useSendBalance/useSendBalance.d.ts +17 -0
- package/src/lib/utils/hooks/useSendBalance/useSendBalance.js +117 -0
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +12 -8
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +12 -8
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +12 -8
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +12 -8
- package/src/lib/utils/hooks/useTransactionEstimatedGas/useTransactionEstimatedGas.cjs +4 -2
- package/src/lib/utils/hooks/useTransactionEstimatedGas/useTransactionEstimatedGas.d.ts +4 -3
- package/src/lib/utils/hooks/useTransactionEstimatedGas/useTransactionEstimatedGas.js +4 -2
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs +12 -8
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js +12 -8
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs +13 -9
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js +13 -9
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +12 -8
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +12 -8
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.cjs +9 -44
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.d.ts +3 -5
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.js +10 -45
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +13 -9
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.d.ts +5 -2
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +13 -9
- package/src/lib/utils/hooks/useViewSettings/useViewSettings.cjs +12 -8
- package/src/lib/utils/hooks/useViewSettings/useViewSettings.js +12 -8
- package/src/lib/utils/hooks/useWalletConnectorOptions/useWalletConnectorOptions.cjs +1 -3
- package/src/lib/utils/hooks/useWalletConnectorOptions/useWalletConnectorOptions.d.ts +3 -4
- package/src/lib/utils/hooks/useWalletConnectorOptions/useWalletConnectorOptions.js +1 -3
- package/src/lib/utils/hooks/useWalletConnectorOptions/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs +2 -0
- package/src/lib/utils/hooks/useWalletConnectorOptions/utils/verifyMagicIsSetup/verifyMagicIsSetup.js +2 -0
- package/src/lib/utils/hooks/useWalletConnectorOptions/utils/verifyZeroDevIsSetup/verifyZeroDevIsSetup.cjs +2 -0
- package/src/lib/utils/hooks/useWalletConnectorOptions/utils/verifyZeroDevIsSetup/verifyZeroDevIsSetup.js +2 -0
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.cjs +2 -0
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.js +2 -0
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +2 -0
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +2 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.cjs +2 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.js +2 -0
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +11 -7
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +11 -7
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +14 -10
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.d.ts +1 -5
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +14 -10
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.cjs +2 -0
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.js +2 -0
- package/src/lib/views/AccountExistsView/AccountExistsView.cjs +11 -7
- package/src/lib/views/AccountExistsView/AccountExistsView.js +11 -7
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +12 -8
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +12 -8
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +12 -8
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +12 -8
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +12 -8
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +12 -8
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +11 -7
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +11 -7
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +12 -8
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +12 -8
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +11 -7
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +11 -7
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +11 -8
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +11 -8
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +11 -7
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +11 -7
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +11 -7
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +11 -7
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +11 -8
- package/src/lib/views/EmailUpdate/EmailUpdate.js +11 -8
- package/src/lib/views/EmailVerification/EmailVerification.cjs +14 -10
- package/src/lib/views/EmailVerification/EmailVerification.js +14 -10
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +32 -26
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +32 -26
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +15 -16
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +15 -16
- package/src/lib/views/EnterPasswordView/EnterPasswordView.d.ts +8 -0
- package/src/lib/views/EnterPasswordView/index.d.ts +1 -0
- package/src/lib/views/LoginView/LoginView.cjs +39 -19
- package/src/lib/views/LoginView/LoginView.js +39 -19
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +18 -27
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +20 -29
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs +125 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.d.ts +3 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js +121 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/checkPhoneNumberForError/checkPhoneNumberForError.cjs +12 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/checkPhoneNumberForError/checkPhoneNumberForError.d.ts +5 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/checkPhoneNumberForError/checkPhoneNumberForError.js +8 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/checkPhoneNumberForError/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/getCustomCountries/getCustomCountries.cjs +21 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/getCustomCountries/getCustomCountries.d.ts +4 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/getCustomCountries/getCustomCountries.js +16 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/getCustomCountries/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/usePhoneInputLogic/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/usePhoneInputLogic/usePhoneInputLogic.cjs +235 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/usePhoneInputLogic/usePhoneInputLogic.d.ts +33 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/usePhoneInputLogic/usePhoneInputLogic.js +230 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +12 -8
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +12 -8
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +12 -8
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +12 -8
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.cjs +12 -8
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.js +12 -8
- package/src/lib/views/{SendBalanceView/components/TransactionStage/TransactionStage.cjs → LoginView/sections/ToggleableSection/ToggleableSection.cjs} +33 -34
- package/src/lib/views/LoginView/sections/ToggleableSection/ToggleableSection.d.ts +11 -0
- package/src/lib/views/{SendBalanceView/components/TransactionStage/TransactionStage.js → LoginView/sections/ToggleableSection/ToggleableSection.js} +34 -35
- package/src/lib/views/LoginView/sections/ToggleableSection/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +11 -7
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +11 -7
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.cjs +11 -7
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.js +11 -7
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +12 -8
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +12 -8
- package/src/lib/views/LoginView/sections/index.d.ts +3 -1
- package/src/lib/views/LoginView/useLoginView/getLoginViewStructure/getLoginViewStructure.cjs +62 -0
- package/src/lib/views/LoginView/useLoginView/getLoginViewStructure/getLoginViewStructure.d.ts +28 -0
- package/src/lib/views/LoginView/useLoginView/getLoginViewStructure/getLoginViewStructure.js +58 -0
- package/src/lib/views/LoginView/useLoginView/getLoginViewStructure/index.d.ts +1 -0
- package/src/lib/views/LoginView/useLoginView/index.d.ts +1 -0
- package/src/lib/views/LoginView/useLoginView/useLoginView.cjs +201 -0
- package/src/lib/views/LoginView/{useLoginView.d.ts → useLoginView/useLoginView.d.ts} +1 -1
- package/src/lib/views/LoginView/useLoginView/useLoginView.js +196 -0
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +13 -9
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +13 -9
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +10 -6
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +10 -6
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +10 -6
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +10 -6
- package/src/lib/views/NoAccess/NoAccess.cjs +12 -8
- package/src/lib/views/NoAccess/NoAccess.js +12 -8
- package/src/lib/views/NoAccess/useNoAccessText.cjs +12 -8
- package/src/lib/views/NoAccess/useNoAccessText.js +12 -8
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +11 -7
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +11 -7
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +11 -7
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +11 -7
- package/src/lib/views/Passkey/EmbeddedAuthChoice/AuthChoiceInfo/AuthChoiceInfo.cjs +11 -7
- package/src/lib/views/Passkey/EmbeddedAuthChoice/AuthChoiceInfo/AuthChoiceInfo.js +11 -7
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.cjs +11 -7
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.js +11 -7
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.cjs +11 -7
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.js +11 -7
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.cjs +11 -7
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.js +11 -7
- package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.cjs +12 -8
- package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.js +12 -8
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +13 -9
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +13 -9
- package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.cjs +11 -7
- package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.js +11 -7
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.cjs +13 -13
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.js +13 -13
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.cjs +13 -12
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.js +13 -12
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +11 -7
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +11 -7
- package/src/lib/views/Passkey/RenamePasskeyView/RenamePasskeyView.cjs +10 -7
- package/src/lib/views/Passkey/RenamePasskeyView/RenamePasskeyView.js +10 -7
- package/src/lib/views/Passkey/utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.cjs +1 -0
- package/src/lib/views/Passkey/utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.js +1 -0
- package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.cjs +1 -0
- package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.js +1 -0
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.cjs +1 -0
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.js +1 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +11 -7
- package/src/lib/views/PendingConnectView/PendingConnectView.js +11 -7
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +11 -7
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +11 -7
- package/src/lib/views/QrCodeView/QRCode.cjs +12 -8
- package/src/lib/views/QrCodeView/QRCode.js +12 -8
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +11 -7
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +11 -7
- package/src/lib/views/QrCodeView/QrCodeView.cjs +12 -8
- package/src/lib/views/QrCodeView/QrCodeView.js +12 -8
- package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.cjs +11 -7
- package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.js +11 -7
- package/src/lib/views/SelectWalletInWalletGroupView/SelectWalletInWalletGroupView.cjs +12 -8
- package/src/lib/views/SelectWalletInWalletGroupView/SelectWalletInWalletGroupView.js +12 -8
- package/src/lib/views/SelectWalletInWalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +12 -8
- package/src/lib/views/SelectWalletInWalletGroupView/components/WalletGroupItem/WalletGroupItem.js +12 -8
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +34 -53
- package/src/lib/views/SendBalanceView/SendBalanceView.js +34 -53
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +11 -7
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +11 -7
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +11 -7
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +11 -7
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +39 -25
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.d.ts +6 -3
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +40 -26
- package/src/lib/views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs +17 -2
- package/src/lib/views/TransactionConfirmationView/helpers/transactionErrorMessage.js +17 -2
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.cjs +21 -11
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.d.ts +5 -4
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.js +21 -11
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.cjs +12 -8
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.js +12 -8
- package/src/lib/views/UserFieldEditorView/useAssignDefaultValues/useAssignDefaultValues.cjs +12 -8
- package/src/lib/views/UserFieldEditorView/useAssignDefaultValues/useAssignDefaultValues.js +12 -8
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +11 -7
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +11 -7
- package/src/lib/views/WalletGroupView/WalletGroupView.cjs +13 -9
- package/src/lib/views/WalletGroupView/WalletGroupView.js +13 -9
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +12 -8
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.js +12 -8
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +11 -7
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +11 -7
- package/src/lib/views/WalletList/WalletList.cjs +11 -7
- package/src/lib/views/WalletList/WalletList.js +11 -7
- package/src/lib/views/WalletList/WalletListGridTabs/WalletListGridTabs.cjs +11 -7
- package/src/lib/views/WalletList/WalletListGridTabs/WalletListGridTabs.js +11 -7
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +12 -8
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +12 -8
- package/src/lib/views/WalletList/data.cjs +2 -6
- package/src/lib/views/WalletList/data.d.ts +1 -1
- package/src/lib/views/WalletList/data.js +2 -6
- package/src/lib/views/WalletList/hooks/useTabState.cjs +12 -8
- package/src/lib/views/WalletList/hooks/useTabState.js +12 -8
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +11 -7
- package/src/lib/views/WalletLockedView/WalletLockedView.js +11 -7
- package/src/lib/views/WalletRedirectView/WalletRedirectView.cjs +86 -0
- package/src/lib/views/WalletRedirectView/WalletRedirectView.d.ts +2 -0
- package/src/lib/views/WalletRedirectView/WalletRedirectView.js +82 -0
- package/src/lib/views/WalletRedirectView/index.d.ts +1 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +12 -8
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +12 -8
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +12 -8
- package/src/lib/views/WalletUsedView/WalletUsedView.js +12 -8
- package/src/lib/views/viewToComponentMap.cjs +14 -7
- package/src/lib/views/viewToComponentMap.js +14 -7
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +11 -7
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +11 -7
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +11 -7
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +11 -7
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +11 -7
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +11 -7
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +10 -6
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +10 -6
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +12 -8
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +12 -8
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.cjs +12 -8
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.js +12 -8
- package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.cjs +12 -8
- package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.js +12 -8
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +11 -7
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +11 -7
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs +12 -8
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js +12 -8
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.cjs +10 -7
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.js +10 -7
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.cjs +10 -6
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.js +10 -6
- package/src/lib/widgets/DynamicMultiWalletPromptsWidget/DynamicMultiWalletPromptsWidget.cjs +71 -1
- package/src/lib/widgets/DynamicMultiWalletPromptsWidget/DynamicMultiWalletPromptsWidget.js +71 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +11 -7
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +38 -42
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +38 -42
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.cjs +9 -5
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.js +9 -5
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.cjs +13 -8
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.d.ts +2 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.js +13 -8
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/index.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +22 -21
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.d.ts +3 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +23 -22
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +20 -10
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +20 -10
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +4 -53
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +4 -53
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +11 -7
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.cjs +12 -8
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.js +12 -8
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +10 -6
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +10 -6
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +12 -8
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +12 -8
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +20 -23
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +20 -23
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +12 -8
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +12 -8
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +11 -7
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +9 -5
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +9 -5
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +11 -7
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +14 -8
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +14 -8
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +11 -7
- package/src/lib/widgets/DynamicWidget/components/PromptModal/PromptModal.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/components/PromptModal/PromptModal.js +11 -7
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +11 -7
- package/src/lib/widgets/DynamicWidget/components/UnknownWalletInformation/UnknownWalletInformation.cjs +9 -5
- package/src/lib/widgets/DynamicWidget/components/UnknownWalletInformation/UnknownWalletInformation.js +9 -5
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +12 -8
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +12 -8
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithNetwork/WalletIconWithNetwork.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithNetwork/WalletIconWithNetwork.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +11 -7
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +12 -8
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +12 -8
- package/src/lib/widgets/DynamicWidget/hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.cjs +12 -8
- package/src/lib/widgets/DynamicWidget/hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.js +12 -8
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +14 -10
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.d.ts +4 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +14 -10
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs +19 -10
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.d.ts +4 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js +19 -10
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.cjs +16 -10
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.d.ts +4 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.js +16 -10
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs +12 -8
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js +12 -8
- package/src/lib/widgets/DynamicWidget/hooks/useMultiWalletPromptState/useMultiWalletPromptState.cjs +12 -8
- package/src/lib/widgets/DynamicWidget/hooks/useMultiWalletPromptState/useMultiWalletPromptState.js +12 -8
- package/src/lib/widgets/DynamicWidget/prompts/AwaitingConnectionModal/AwaitingConnectionModal.cjs +12 -8
- package/src/lib/widgets/DynamicWidget/prompts/AwaitingConnectionModal/AwaitingConnectionModal.js +12 -8
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +12 -8
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +12 -8
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.cjs +12 -8
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.js +12 -8
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +11 -7
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +12 -8
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +12 -8
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +12 -8
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +12 -8
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +11 -7
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +10 -6
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +10 -6
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +11 -7
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +11 -7
- package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.cjs +12 -8
- package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.js +12 -8
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +9 -5
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +9 -5
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +11 -7
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +11 -7
- package/src/lib/components/OverlayCard/OverlayCard.context.cjs +0 -9
- package/src/lib/components/OverlayCard/OverlayCard.context.d.ts +0 -6
- package/src/lib/components/OverlayCard/OverlayCard.context.js +0 -5
- package/src/lib/components/OverlayCard/OverlayCardTarget.cjs +0 -17
- package/src/lib/components/OverlayCard/OverlayCardTarget.d.ts +0 -2
- package/src/lib/components/OverlayCard/OverlayCardTarget.js +0 -13
- package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.d.ts +0 -6
- package/src/lib/components/SecureTurnkeyWalletCard/index.d.ts +0 -1
- package/src/lib/components/SyncPasskeyFlow/SyncPasskeyFlow.d.ts +0 -1
- package/src/lib/components/SyncPasskeyFlow/index.d.ts +0 -1
- package/src/lib/context/EmailVerificationContext/EmailVerificationContext.cjs +0 -31
- package/src/lib/context/EmailVerificationContext/EmailVerificationContext.d.ts +0 -13
- package/src/lib/context/EmailVerificationContext/EmailVerificationContext.js +0 -25
- package/src/lib/context/EmailVerificationContext/index.d.ts +0 -1
- package/src/lib/utils/functions/isAccountAbstractionWallet/isAccountAbstractionWallet.cjs +0 -18
- package/src/lib/utils/functions/isAccountAbstractionWallet/isAccountAbstractionWallet.js +0 -14
- package/src/lib/utils/functions/isMagicConnector/isMagicConnector.cjs +0 -10
- package/src/lib/utils/functions/isMagicConnector/isMagicConnector.js +0 -6
- package/src/lib/utils/hooks/useTransactionWithGasPrice/index.d.ts +0 -1
- package/src/lib/utils/hooks/useTransactionWithGasPrice/useTransactionWithGasPrice.cjs +0 -56
- package/src/lib/utils/hooks/useTransactionWithGasPrice/useTransactionWithGasPrice.d.ts +0 -32
- package/src/lib/utils/hooks/useTransactionWithGasPrice/useTransactionWithGasPrice.js +0 -52
- package/src/lib/views/LoginView/useLoginView.cjs +0 -265
- package/src/lib/views/LoginView/useLoginView.js +0 -260
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.d.ts +0 -11
- package/src/lib/views/SendBalanceView/components/TransactionStage/index.d.ts +0 -1
- package/src/lib/views/SendBalanceView/components/index.d.ts +0 -1
|
@@ -12,27 +12,28 @@ var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
|
12
12
|
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
13
13
|
require('@dynamic-labs/sdk-api');
|
|
14
14
|
var logger = require('../../shared/logger.cjs');
|
|
15
|
-
|
|
15
|
+
require('@dynamic-labs/iconic');
|
|
16
|
+
require('../../context/ViewContext/ViewContext.cjs');
|
|
16
17
|
require('@dynamic-labs/wallet-book');
|
|
17
18
|
var shortenWalletAddress = require('../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
|
|
18
19
|
require('../../utils/constants/colors.cjs');
|
|
19
20
|
require('../../utils/constants/values.cjs');
|
|
20
21
|
require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
21
22
|
var formatBigNumber = require('../../shared/utils/functions/formatBigNumber/formatBigNumber.cjs');
|
|
22
|
-
require('@dynamic-labs/iconic');
|
|
23
|
-
require('../../context/ViewContext/ViewContext.cjs');
|
|
24
23
|
require('../../shared/consts/index.cjs');
|
|
25
24
|
require('../../events/dynamicEvents.cjs');
|
|
26
25
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
27
26
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
28
27
|
require('@dynamic-labs/multi-wallet');
|
|
29
28
|
var getAppOrigin = require('../../utils/functions/getAppOrigin/getAppOrigin.cjs');
|
|
29
|
+
require('../../config/ApiEndpoint.cjs');
|
|
30
|
+
require('react-international-phone');
|
|
30
31
|
require('viem/chains');
|
|
31
32
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
32
33
|
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
33
|
-
require('../../
|
|
34
|
-
require('../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
34
|
+
require('../../context/VerificationContext/VerificationContext.cjs');
|
|
35
35
|
require('react-dom');
|
|
36
|
+
require('../../context/WalletContext/WalletContext.cjs');
|
|
36
37
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
37
38
|
var useMutation = require('../../utils/hooks/useMutation/useMutation.cjs');
|
|
38
39
|
var usePromise = require('../../utils/hooks/usePromise/usePromise.cjs');
|
|
@@ -45,34 +46,36 @@ require('@dynamic-labs/rpc-providers');
|
|
|
45
46
|
require('../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
46
47
|
var Alert = require('../../components/Alert/Alert.cjs');
|
|
47
48
|
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
48
|
-
var Icon = require('../../components/Icon/Icon.cjs');
|
|
49
49
|
require('../../components/IconButton/IconButton.cjs');
|
|
50
50
|
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
51
|
+
require('../../components/Input/Input.cjs');
|
|
51
52
|
require('../../components/IsBrowser/IsBrowser.cjs');
|
|
52
53
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
53
54
|
require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
54
55
|
require('../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
55
56
|
require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
57
|
+
require('../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
58
|
+
require('../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
56
59
|
require('../../components/Popper/Popper/Popper.cjs');
|
|
57
60
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
58
61
|
require('react-focus-lock');
|
|
59
|
-
require('formik');
|
|
60
|
-
require('i18next');
|
|
61
|
-
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
62
|
-
var TransactionConfirmationPageLayout = require('../../components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs');
|
|
63
|
-
var TransactionRow = require('../../components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.cjs');
|
|
64
|
-
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
65
|
-
require('../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
66
62
|
require('../WalletList/WalletList.cjs');
|
|
67
63
|
var useFetchChain = require('../../widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs');
|
|
68
64
|
var useFetchCurrency = require('../../widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.cjs');
|
|
65
|
+
require('formik');
|
|
69
66
|
require('qrcode');
|
|
70
67
|
require('@hcaptcha/react-hcaptcha');
|
|
71
68
|
require('../../context/LoadingContext/LoadingContext.cjs');
|
|
72
69
|
require('../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
73
70
|
require('../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
74
71
|
require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
72
|
+
require('i18next');
|
|
75
73
|
require('../../context/FooterAnimationContext/index.cjs');
|
|
74
|
+
require('../LoginView/sections/PhoneNumberSignInSection/usePhoneInputLogic/usePhoneInputLogic.cjs');
|
|
75
|
+
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
76
|
+
var TransactionConfirmationPageLayout = require('../../components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs');
|
|
77
|
+
var TransactionRow = require('../../components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.cjs');
|
|
78
|
+
var ChainIcon = require('../../components/ChainIcon/ChainIcon.cjs');
|
|
76
79
|
require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
77
80
|
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
78
81
|
require('../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
@@ -82,7 +85,7 @@ var transactionErrorMessage = require('./helpers/transactionErrorMessage.cjs');
|
|
|
82
85
|
require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
83
86
|
var useInternalDynamicContext = require('../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.cjs');
|
|
84
87
|
|
|
85
|
-
const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess, onClickBack, onClickClose, title, displayPoweredByDynamicFooter = false, provider, copykey, }) => {
|
|
88
|
+
const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess, onClickBack, onClickClose, parser = viem.parseEther, title, displayPoweredByDynamicFooter = false, provider, getGasPrice, copykey, }) => {
|
|
86
89
|
const { appName, appLogoUrl, primaryWallet } = useInternalDynamicContext.useInternalDynamicContext();
|
|
87
90
|
const appOrigin = getAppOrigin.getAppOrigin();
|
|
88
91
|
const [isGasSponsored, setIsGasSponsored] = React.useState(false);
|
|
@@ -90,10 +93,10 @@ const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess
|
|
|
90
93
|
if (!primaryWallet) {
|
|
91
94
|
throw new utils.DynamicError('Primary wallet is not available, transaction cannot be displayed');
|
|
92
95
|
}
|
|
93
|
-
const
|
|
96
|
+
const { currency: currencySymbol } = useFetchCurrency.useFetchCurrency(primaryWallet.connector);
|
|
94
97
|
const { data: balance } = usePromise.usePromise(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
95
98
|
const balanceText = yield primaryWallet.connector.getBalance();
|
|
96
|
-
return balanceText ?
|
|
99
|
+
return balanceText ? parser(balanceText) : undefined;
|
|
97
100
|
}));
|
|
98
101
|
const { isLoading: isGasSponsoredLoading } = usePromise.usePromise(() => {
|
|
99
102
|
if (!walletConnectorCore.isAccountAbstractionConnector(primaryWallet.connector)) {
|
|
@@ -128,6 +131,7 @@ const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess
|
|
|
128
131
|
onSuccess: (tx) => onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(tx),
|
|
129
132
|
});
|
|
130
133
|
const { isLoading: isGasPriceLoading, gasTotalPrice, isGasEstimated, } = useTransactionGas.useTransactionGas({
|
|
134
|
+
getGasPrice,
|
|
131
135
|
provider,
|
|
132
136
|
transaction,
|
|
133
137
|
});
|
|
@@ -150,10 +154,8 @@ const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess
|
|
|
150
154
|
isTransactionToAddressLoading ||
|
|
151
155
|
isTransactionFromAddressLoading ||
|
|
152
156
|
isGasSponsoredLoading;
|
|
153
|
-
const
|
|
157
|
+
const { chain } = useFetchChain.useFetchChain(primaryWallet.connector);
|
|
154
158
|
const chainName = (chain === null || chain === void 0 ? void 0 : chain.name) || primaryWallet.chain;
|
|
155
|
-
const ChainIconComponent = getChainIcon.getChainIcon(chainName);
|
|
156
|
-
const chainIcon = (jsxRuntime.jsx(Icon.Icon, { size: 'small', children: (chain === null || chain === void 0 ? void 0 : chain.icon) ? (jsxRuntime.jsx("img", { src: chain.icon, alt: `${chain.name} icon` })) : (jsxRuntime.jsx(ChainIconComponent, {})) }));
|
|
157
159
|
const errorMessage = transactionError && transactionErrorMessage.transactionErrorMessage(transactionError);
|
|
158
160
|
const missingFunds = React.useMemo(() => {
|
|
159
161
|
if (balance === undefined || total === undefined)
|
|
@@ -174,7 +176,7 @@ const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess
|
|
|
174
176
|
const showInsufficientFundsWarningMessage = hasInsufficientFunds && missingFunds;
|
|
175
177
|
if (!showInsufficientFundsWarningMessage)
|
|
176
178
|
return;
|
|
177
|
-
const amountLeft = formatBigNumber.formatBigNumber(missingFunds, 5);
|
|
179
|
+
const amountLeft = formatBigNumber.formatBigNumber(chain === null || chain === void 0 ? void 0 : chain.symbol, missingFunds, 5);
|
|
178
180
|
return (jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'warning', contentDataTestId: 'warning_content', copykey: 'dyn_send_transaction.warning_message.insufficient_funds', children: t('dyn_send_transaction.warning_message.insufficient_funds', {
|
|
179
181
|
amountLeft,
|
|
180
182
|
currencySymbol,
|
|
@@ -188,15 +190,27 @@ const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess
|
|
|
188
190
|
isTransactionLoading,
|
|
189
191
|
errorMessage,
|
|
190
192
|
]);
|
|
191
|
-
return (jsxRuntime.jsxs(TransactionConfirmationPageLayout.TransactionConfirmationPageLayout, { onClickBack: onClickBack, onClickClose: onClickClose, copykey: copykey, title: title, appOrigin: appOrigin, appName: appName, appLogoUrl: appLogoUrl, isLoading: isLoading, onClickSend: () => send(), displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, disableSendButton: isTransactionLoading
|
|
192
|
-
shortenWalletAddress.shortenWalletAddress(transactionToAddress, 4, 4) }), jsxRuntime.jsx(TransactionRow.TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.amount', label: t('dyn_send_transaction.confirmation.data.amount'), isLoading: isTransactionValueLoading, isEmpty: !transactionValue, title: transactionValue
|
|
193
|
+
return (jsxRuntime.jsxs(TransactionConfirmationPageLayout.TransactionConfirmationPageLayout, { onClickBack: onClickBack, onClickClose: onClickClose, copykey: copykey, title: title, appOrigin: appOrigin, appName: appName, appLogoUrl: appLogoUrl, isLoading: isLoading, onClickSend: () => send(), displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, disableSendButton: isTransactionLoading, error: errorMessage, alert: alert, children: [jsxRuntime.jsx(TransactionRow.TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.from', label: t('dyn_send_transaction.confirmation.data.from'), isLoading: isTransactionFromAddressLoading, title: transactionFromAddress, children: shortenWalletAddress.shortenWalletAddress(transactionFromAddress, 4, 4) }), jsxRuntime.jsx(TransactionRow.TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.to', label: t('dyn_send_transaction.confirmation.data.to'), isLoading: isTransactionToAddressLoading, title: transactionToAddress, children: transactionToAddress &&
|
|
194
|
+
shortenWalletAddress.shortenWalletAddress(transactionToAddress, 4, 4) }), jsxRuntime.jsx(TransactionRow.TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.amount', label: t('dyn_send_transaction.confirmation.data.amount'), isLoading: isTransactionValueLoading, isEmpty: !transactionValue, title: transactionValue
|
|
195
|
+
? formatBigNumber.formatBigNumber(chain === null || chain === void 0 ? void 0 : chain.symbol, transactionValue)
|
|
196
|
+
: undefined, suffix: currencySymbol, icon: chain && jsxRuntime.jsx(ChainIcon.ChainIcon, { chain: chain, chainName: chainName }), dataTestId: 'transaction-amount', children: transactionValue
|
|
197
|
+
? formatBigNumber.formatBigNumber(chain === null || chain === void 0 ? void 0 : chain.symbol, transactionValue, 10)
|
|
198
|
+
: 0 }), !isGasSponsored && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(TransactionRow.TransactionRow, { copykey: isGasEstimated
|
|
193
199
|
? 'dyn_send_transaction.confirmation.data.gas_estimate'
|
|
194
200
|
: 'dyn_send_transaction.confirmation.data.gas', label: isGasEstimated
|
|
195
201
|
? t('dyn_send_transaction.confirmation.data.gas_estimate')
|
|
196
|
-
: t('dyn_send_transaction.confirmation.data.gas'), isEmpty: !gasTotalPrice, isLoading: isGasPriceLoading || isGasSponsoredLoading, title: gasTotalPrice
|
|
202
|
+
: t('dyn_send_transaction.confirmation.data.gas'), isEmpty: !gasTotalPrice, isLoading: isGasPriceLoading || isGasSponsoredLoading, title: gasTotalPrice
|
|
203
|
+
? formatBigNumber.formatBigNumber(chain === null || chain === void 0 ? void 0 : chain.symbol, gasTotalPrice)
|
|
204
|
+
: undefined, suffix: gasTotalPrice ? currencySymbol : undefined, icon: gasTotalPrice
|
|
205
|
+
? chain && jsxRuntime.jsx(ChainIcon.ChainIcon, { chain: chain, chainName: chainName })
|
|
206
|
+
: undefined, dataTestId: isGasEstimated
|
|
197
207
|
? 'transaction-estimated-gas-fee'
|
|
198
|
-
: 'transaction-gas-fee', children: gasTotalPrice
|
|
199
|
-
? formatBigNumber.formatBigNumber(
|
|
208
|
+
: 'transaction-gas-fee', children: gasTotalPrice
|
|
209
|
+
? formatBigNumber.formatBigNumber(chain === null || chain === void 0 ? void 0 : chain.symbol, gasTotalPrice, 10)
|
|
210
|
+
: '--' }), jsxRuntime.jsx(TransactionRow.TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.total', label: t('dyn_send_transaction.confirmation.data.total'), isEmpty: !total, title: total ? formatBigNumber.formatBigNumber(chain === null || chain === void 0 ? void 0 : chain.symbol, total) : undefined, suffix: total ? currencySymbol : undefined, icon: total
|
|
211
|
+
? chain && jsxRuntime.jsx(ChainIcon.ChainIcon, { chain: chain, chainName: chainName })
|
|
212
|
+
: undefined, dataTestId: 'transaction-total', children: total
|
|
213
|
+
? formatBigNumber.formatBigNumber(chain === null || chain === void 0 ? void 0 : chain.symbol, total, 10)
|
|
200
214
|
: t('dyn_send_transaction.confirmation.not_applied') })] }))] }));
|
|
201
215
|
};
|
|
202
216
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FC, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
-
import { Address
|
|
2
|
+
import { Address } from 'viem';
|
|
3
|
+
import { IUITransaction } from '@dynamic-labs/types';
|
|
3
4
|
import { CopyKey } from '../../shared';
|
|
4
5
|
export type TransactionConfirmationViewProps = {
|
|
5
6
|
displayPoweredByDynamicFooter?: boolean;
|
|
@@ -9,7 +10,9 @@ export type TransactionConfirmationViewProps = {
|
|
|
9
10
|
onError?: (error: unknown) => void;
|
|
10
11
|
onSuccess?: (transactionAddress: Address) => void;
|
|
11
12
|
title: ReactNode;
|
|
12
|
-
transaction:
|
|
13
|
-
provider:
|
|
13
|
+
transaction: IUITransaction;
|
|
14
|
+
provider: unknown;
|
|
15
|
+
parser?: (value: string) => bigint | undefined;
|
|
16
|
+
getGasPrice?: (_: IUITransaction) => Promise<bigint> | undefined;
|
|
14
17
|
} & CopyKey;
|
|
15
18
|
export declare const TransactionConfirmationView: FC<TransactionConfirmationViewProps>;
|
|
@@ -2,33 +2,34 @@ import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useMemo } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import {
|
|
5
|
+
import { isHex, hexToBigInt, parseEther } from 'viem';
|
|
6
6
|
import { DynamicError, TransactionGasCannotBeSponsoredError } from '@dynamic-labs/utils';
|
|
7
7
|
import { isAccountAbstractionConnector } from '@dynamic-labs/wallet-connector-core';
|
|
8
8
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
9
9
|
import '@dynamic-labs/sdk-api';
|
|
10
10
|
import { logger } from '../../shared/logger.js';
|
|
11
|
-
import
|
|
11
|
+
import '@dynamic-labs/iconic';
|
|
12
|
+
import '../../context/ViewContext/ViewContext.js';
|
|
12
13
|
import '@dynamic-labs/wallet-book';
|
|
13
14
|
import { shortenWalletAddress } from '../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
|
|
14
15
|
import '../../utils/constants/colors.js';
|
|
15
16
|
import '../../utils/constants/values.js';
|
|
16
17
|
import '../../shared/utils/classes/storage/localStorage.js';
|
|
17
18
|
import { formatBigNumber } from '../../shared/utils/functions/formatBigNumber/formatBigNumber.js';
|
|
18
|
-
import '@dynamic-labs/iconic';
|
|
19
|
-
import '../../context/ViewContext/ViewContext.js';
|
|
20
19
|
import '../../shared/consts/index.js';
|
|
21
20
|
import '../../events/dynamicEvents.js';
|
|
22
21
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
23
22
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
24
23
|
import '@dynamic-labs/multi-wallet';
|
|
25
24
|
import { getAppOrigin } from '../../utils/functions/getAppOrigin/getAppOrigin.js';
|
|
25
|
+
import '../../config/ApiEndpoint.js';
|
|
26
|
+
import 'react-international-phone';
|
|
26
27
|
import 'viem/chains';
|
|
27
28
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
28
29
|
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
29
|
-
import '../../
|
|
30
|
-
import '../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
30
|
+
import '../../context/VerificationContext/VerificationContext.js';
|
|
31
31
|
import 'react-dom';
|
|
32
|
+
import '../../context/WalletContext/WalletContext.js';
|
|
32
33
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
33
34
|
import { useMutation } from '../../utils/hooks/useMutation/useMutation.js';
|
|
34
35
|
import { usePromise } from '../../utils/hooks/usePromise/usePromise.js';
|
|
@@ -41,34 +42,36 @@ import '@dynamic-labs/rpc-providers';
|
|
|
41
42
|
import '../../context/UserWalletsContext/UserWalletsContext.js';
|
|
42
43
|
import { Alert } from '../../components/Alert/Alert.js';
|
|
43
44
|
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
44
|
-
import { Icon } from '../../components/Icon/Icon.js';
|
|
45
45
|
import '../../components/IconButton/IconButton.js';
|
|
46
46
|
import '../../components/InlineWidget/InlineWidget.js';
|
|
47
|
+
import '../../components/Input/Input.js';
|
|
47
48
|
import '../../components/IsBrowser/IsBrowser.js';
|
|
48
49
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
49
50
|
import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
50
51
|
import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
51
52
|
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
53
|
+
import '../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.js';
|
|
54
|
+
import '../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
52
55
|
import '../../components/Popper/Popper/Popper.js';
|
|
53
56
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
54
57
|
import 'react-focus-lock';
|
|
55
|
-
import 'formik';
|
|
56
|
-
import 'i18next';
|
|
57
|
-
import '../../components/OverlayCard/OverlayCard.context.js';
|
|
58
|
-
import { TransactionConfirmationPageLayout } from '../../components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js';
|
|
59
|
-
import { TransactionRow } from '../../components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.js';
|
|
60
|
-
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
61
|
-
import '../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
62
58
|
import '../WalletList/WalletList.js';
|
|
63
59
|
import { useFetchChain } from '../../widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js';
|
|
64
60
|
import { useFetchCurrency } from '../../widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.js';
|
|
61
|
+
import 'formik';
|
|
65
62
|
import 'qrcode';
|
|
66
63
|
import '@hcaptcha/react-hcaptcha';
|
|
67
64
|
import '../../context/LoadingContext/LoadingContext.js';
|
|
68
65
|
import '../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
69
66
|
import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
70
67
|
import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
68
|
+
import 'i18next';
|
|
71
69
|
import '../../context/FooterAnimationContext/index.js';
|
|
70
|
+
import '../LoginView/sections/PhoneNumberSignInSection/usePhoneInputLogic/usePhoneInputLogic.js';
|
|
71
|
+
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
72
|
+
import { TransactionConfirmationPageLayout } from '../../components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js';
|
|
73
|
+
import { TransactionRow } from '../../components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.js';
|
|
74
|
+
import { ChainIcon } from '../../components/ChainIcon/ChainIcon.js';
|
|
72
75
|
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
73
76
|
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
74
77
|
import '../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
@@ -78,7 +81,7 @@ import { transactionErrorMessage } from './helpers/transactionErrorMessage.js';
|
|
|
78
81
|
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
79
82
|
import { useInternalDynamicContext } from '../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.js';
|
|
80
83
|
|
|
81
|
-
const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess, onClickBack, onClickClose, title, displayPoweredByDynamicFooter = false, provider, copykey, }) => {
|
|
84
|
+
const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess, onClickBack, onClickClose, parser = parseEther, title, displayPoweredByDynamicFooter = false, provider, getGasPrice, copykey, }) => {
|
|
82
85
|
const { appName, appLogoUrl, primaryWallet } = useInternalDynamicContext();
|
|
83
86
|
const appOrigin = getAppOrigin();
|
|
84
87
|
const [isGasSponsored, setIsGasSponsored] = useState(false);
|
|
@@ -86,10 +89,10 @@ const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess
|
|
|
86
89
|
if (!primaryWallet) {
|
|
87
90
|
throw new DynamicError('Primary wallet is not available, transaction cannot be displayed');
|
|
88
91
|
}
|
|
89
|
-
const
|
|
92
|
+
const { currency: currencySymbol } = useFetchCurrency(primaryWallet.connector);
|
|
90
93
|
const { data: balance } = usePromise(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
91
94
|
const balanceText = yield primaryWallet.connector.getBalance();
|
|
92
|
-
return balanceText ?
|
|
95
|
+
return balanceText ? parser(balanceText) : undefined;
|
|
93
96
|
}));
|
|
94
97
|
const { isLoading: isGasSponsoredLoading } = usePromise(() => {
|
|
95
98
|
if (!isAccountAbstractionConnector(primaryWallet.connector)) {
|
|
@@ -124,6 +127,7 @@ const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess
|
|
|
124
127
|
onSuccess: (tx) => onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(tx),
|
|
125
128
|
});
|
|
126
129
|
const { isLoading: isGasPriceLoading, gasTotalPrice, isGasEstimated, } = useTransactionGas({
|
|
130
|
+
getGasPrice,
|
|
127
131
|
provider,
|
|
128
132
|
transaction,
|
|
129
133
|
});
|
|
@@ -146,10 +150,8 @@ const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess
|
|
|
146
150
|
isTransactionToAddressLoading ||
|
|
147
151
|
isTransactionFromAddressLoading ||
|
|
148
152
|
isGasSponsoredLoading;
|
|
149
|
-
const
|
|
153
|
+
const { chain } = useFetchChain(primaryWallet.connector);
|
|
150
154
|
const chainName = (chain === null || chain === void 0 ? void 0 : chain.name) || primaryWallet.chain;
|
|
151
|
-
const ChainIconComponent = getChainIcon(chainName);
|
|
152
|
-
const chainIcon = (jsx(Icon, { size: 'small', children: (chain === null || chain === void 0 ? void 0 : chain.icon) ? (jsx("img", { src: chain.icon, alt: `${chain.name} icon` })) : (jsx(ChainIconComponent, {})) }));
|
|
153
155
|
const errorMessage = transactionError && transactionErrorMessage(transactionError);
|
|
154
156
|
const missingFunds = useMemo(() => {
|
|
155
157
|
if (balance === undefined || total === undefined)
|
|
@@ -170,7 +172,7 @@ const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess
|
|
|
170
172
|
const showInsufficientFundsWarningMessage = hasInsufficientFunds && missingFunds;
|
|
171
173
|
if (!showInsufficientFundsWarningMessage)
|
|
172
174
|
return;
|
|
173
|
-
const amountLeft = formatBigNumber(missingFunds, 5);
|
|
175
|
+
const amountLeft = formatBigNumber(chain === null || chain === void 0 ? void 0 : chain.symbol, missingFunds, 5);
|
|
174
176
|
return (jsx(Alert, { icon: 'error', variant: 'warning', contentDataTestId: 'warning_content', copykey: 'dyn_send_transaction.warning_message.insufficient_funds', children: t('dyn_send_transaction.warning_message.insufficient_funds', {
|
|
175
177
|
amountLeft,
|
|
176
178
|
currencySymbol,
|
|
@@ -184,15 +186,27 @@ const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess
|
|
|
184
186
|
isTransactionLoading,
|
|
185
187
|
errorMessage,
|
|
186
188
|
]);
|
|
187
|
-
return (jsxs(TransactionConfirmationPageLayout, { onClickBack: onClickBack, onClickClose: onClickClose, copykey: copykey, title: title, appOrigin: appOrigin, appName: appName, appLogoUrl: appLogoUrl, isLoading: isLoading, onClickSend: () => send(), displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, disableSendButton: isTransactionLoading
|
|
188
|
-
shortenWalletAddress(transactionToAddress, 4, 4) }), jsx(TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.amount', label: t('dyn_send_transaction.confirmation.data.amount'), isLoading: isTransactionValueLoading, isEmpty: !transactionValue, title: transactionValue
|
|
189
|
+
return (jsxs(TransactionConfirmationPageLayout, { onClickBack: onClickBack, onClickClose: onClickClose, copykey: copykey, title: title, appOrigin: appOrigin, appName: appName, appLogoUrl: appLogoUrl, isLoading: isLoading, onClickSend: () => send(), displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, disableSendButton: isTransactionLoading, error: errorMessage, alert: alert, children: [jsx(TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.from', label: t('dyn_send_transaction.confirmation.data.from'), isLoading: isTransactionFromAddressLoading, title: transactionFromAddress, children: shortenWalletAddress(transactionFromAddress, 4, 4) }), jsx(TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.to', label: t('dyn_send_transaction.confirmation.data.to'), isLoading: isTransactionToAddressLoading, title: transactionToAddress, children: transactionToAddress &&
|
|
190
|
+
shortenWalletAddress(transactionToAddress, 4, 4) }), jsx(TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.amount', label: t('dyn_send_transaction.confirmation.data.amount'), isLoading: isTransactionValueLoading, isEmpty: !transactionValue, title: transactionValue
|
|
191
|
+
? formatBigNumber(chain === null || chain === void 0 ? void 0 : chain.symbol, transactionValue)
|
|
192
|
+
: undefined, suffix: currencySymbol, icon: chain && jsx(ChainIcon, { chain: chain, chainName: chainName }), dataTestId: 'transaction-amount', children: transactionValue
|
|
193
|
+
? formatBigNumber(chain === null || chain === void 0 ? void 0 : chain.symbol, transactionValue, 10)
|
|
194
|
+
: 0 }), !isGasSponsored && (jsxs(Fragment, { children: [jsx(TransactionRow, { copykey: isGasEstimated
|
|
189
195
|
? 'dyn_send_transaction.confirmation.data.gas_estimate'
|
|
190
196
|
: 'dyn_send_transaction.confirmation.data.gas', label: isGasEstimated
|
|
191
197
|
? t('dyn_send_transaction.confirmation.data.gas_estimate')
|
|
192
|
-
: t('dyn_send_transaction.confirmation.data.gas'), isEmpty: !gasTotalPrice, isLoading: isGasPriceLoading || isGasSponsoredLoading, title: gasTotalPrice
|
|
198
|
+
: t('dyn_send_transaction.confirmation.data.gas'), isEmpty: !gasTotalPrice, isLoading: isGasPriceLoading || isGasSponsoredLoading, title: gasTotalPrice
|
|
199
|
+
? formatBigNumber(chain === null || chain === void 0 ? void 0 : chain.symbol, gasTotalPrice)
|
|
200
|
+
: undefined, suffix: gasTotalPrice ? currencySymbol : undefined, icon: gasTotalPrice
|
|
201
|
+
? chain && jsx(ChainIcon, { chain: chain, chainName: chainName })
|
|
202
|
+
: undefined, dataTestId: isGasEstimated
|
|
193
203
|
? 'transaction-estimated-gas-fee'
|
|
194
|
-
: 'transaction-gas-fee', children: gasTotalPrice
|
|
195
|
-
? formatBigNumber(
|
|
204
|
+
: 'transaction-gas-fee', children: gasTotalPrice
|
|
205
|
+
? formatBigNumber(chain === null || chain === void 0 ? void 0 : chain.symbol, gasTotalPrice, 10)
|
|
206
|
+
: '--' }), jsx(TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.total', label: t('dyn_send_transaction.confirmation.data.total'), isEmpty: !total, title: total ? formatBigNumber(chain === null || chain === void 0 ? void 0 : chain.symbol, total) : undefined, suffix: total ? currencySymbol : undefined, icon: total
|
|
207
|
+
? chain && jsx(ChainIcon, { chain: chain, chainName: chainName })
|
|
208
|
+
: undefined, dataTestId: 'transaction-total', children: total
|
|
209
|
+
? formatBigNumber(chain === null || chain === void 0 ? void 0 : chain.symbol, total, 10)
|
|
196
210
|
: t('dyn_send_transaction.confirmation.not_applied') })] }))] }));
|
|
197
211
|
};
|
|
198
212
|
|
|
@@ -18,12 +18,14 @@ require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
|
18
18
|
require('viem');
|
|
19
19
|
require('../../../shared/consts/index.cjs');
|
|
20
20
|
|
|
21
|
+
const magicRpcError = -32603;
|
|
21
22
|
const errorCodesMapping = {
|
|
22
|
-
'-
|
|
23
|
+
'-32002': 'Insufficient funds for this transaction.',
|
|
23
24
|
0: 'The operation either timed out or was not allowed.',
|
|
24
25
|
16: 'Invalid Passkey signature. Select the passkey for this account and device.',
|
|
25
26
|
3: 'You reached the limit of passkeys for this account.',
|
|
26
27
|
INSUFFICIENT_FUNDS: 'Insufficient funds for this transaction.',
|
|
28
|
+
[magicRpcError.toString()]: 'A network error has occurred. Please try again later',
|
|
27
29
|
};
|
|
28
30
|
const errorReasonsMapping = {
|
|
29
31
|
'provided ENS name resolves to null': 'Invalid address. Please check that the entered address is correct.',
|
|
@@ -33,19 +35,26 @@ const getCode = (error) => {
|
|
|
33
35
|
const err = error;
|
|
34
36
|
return (err === null || err === void 0 ? void 0 : err.code) || ((_a = err === null || err === void 0 ? void 0 : err.cause) === null || _a === void 0 ? void 0 : _a.code);
|
|
35
37
|
};
|
|
38
|
+
const getMessage = (error) => {
|
|
39
|
+
const err = error;
|
|
40
|
+
return err === null || err === void 0 ? void 0 : err.message;
|
|
41
|
+
};
|
|
36
42
|
const hasReason = (error) => 'reason' in error && error.reason !== undefined;
|
|
37
43
|
const transactionErrorMessage = (err) => {
|
|
38
44
|
let error = err;
|
|
39
45
|
if (viemUtils.isTransactionExecutionError(err)) {
|
|
40
46
|
error = err.walk();
|
|
41
47
|
}
|
|
42
|
-
logger.logger.debug('transaction error
|
|
48
|
+
logger.logger.debug('transaction error:', error);
|
|
43
49
|
if (utils.TransactionGasCannotBeSponsoredError.isInstance(error)) {
|
|
44
50
|
return;
|
|
45
51
|
}
|
|
46
52
|
if (utils.InsufficientFundsError.isInstance(error)) {
|
|
47
53
|
return errorCodesMapping.INSUFFICIENT_FUNDS;
|
|
48
54
|
}
|
|
55
|
+
if (isMagicInsufficientFundsError(error)) {
|
|
56
|
+
return errorCodesMapping.INSUFFICIENT_FUNDS;
|
|
57
|
+
}
|
|
49
58
|
const code = getCode(error);
|
|
50
59
|
if (code !== undefined && errorCodesMapping[code]) {
|
|
51
60
|
return errorCodesMapping[code];
|
|
@@ -55,5 +64,11 @@ const transactionErrorMessage = (err) => {
|
|
|
55
64
|
}
|
|
56
65
|
return 'Something went wrong.';
|
|
57
66
|
};
|
|
67
|
+
const isMagicInsufficientFundsError = (error) => {
|
|
68
|
+
const code = getCode(error);
|
|
69
|
+
const message = getMessage(error);
|
|
70
|
+
return (code === magicRpcError &&
|
|
71
|
+
Boolean(message === null || message === void 0 ? void 0 : message.includes('insufficient funds for gas * price + value')));
|
|
72
|
+
};
|
|
58
73
|
|
|
59
74
|
exports.transactionErrorMessage = transactionErrorMessage;
|
|
@@ -14,12 +14,14 @@ import '../../../shared/utils/classes/storage/localStorage.js';
|
|
|
14
14
|
import 'viem';
|
|
15
15
|
import '../../../shared/consts/index.js';
|
|
16
16
|
|
|
17
|
+
const magicRpcError = -32603;
|
|
17
18
|
const errorCodesMapping = {
|
|
18
|
-
'-
|
|
19
|
+
'-32002': 'Insufficient funds for this transaction.',
|
|
19
20
|
0: 'The operation either timed out or was not allowed.',
|
|
20
21
|
16: 'Invalid Passkey signature. Select the passkey for this account and device.',
|
|
21
22
|
3: 'You reached the limit of passkeys for this account.',
|
|
22
23
|
INSUFFICIENT_FUNDS: 'Insufficient funds for this transaction.',
|
|
24
|
+
[magicRpcError.toString()]: 'A network error has occurred. Please try again later',
|
|
23
25
|
};
|
|
24
26
|
const errorReasonsMapping = {
|
|
25
27
|
'provided ENS name resolves to null': 'Invalid address. Please check that the entered address is correct.',
|
|
@@ -29,19 +31,26 @@ const getCode = (error) => {
|
|
|
29
31
|
const err = error;
|
|
30
32
|
return (err === null || err === void 0 ? void 0 : err.code) || ((_a = err === null || err === void 0 ? void 0 : err.cause) === null || _a === void 0 ? void 0 : _a.code);
|
|
31
33
|
};
|
|
34
|
+
const getMessage = (error) => {
|
|
35
|
+
const err = error;
|
|
36
|
+
return err === null || err === void 0 ? void 0 : err.message;
|
|
37
|
+
};
|
|
32
38
|
const hasReason = (error) => 'reason' in error && error.reason !== undefined;
|
|
33
39
|
const transactionErrorMessage = (err) => {
|
|
34
40
|
let error = err;
|
|
35
41
|
if (isTransactionExecutionError(err)) {
|
|
36
42
|
error = err.walk();
|
|
37
43
|
}
|
|
38
|
-
logger.debug('transaction error
|
|
44
|
+
logger.debug('transaction error:', error);
|
|
39
45
|
if (TransactionGasCannotBeSponsoredError.isInstance(error)) {
|
|
40
46
|
return;
|
|
41
47
|
}
|
|
42
48
|
if (InsufficientFundsError.isInstance(error)) {
|
|
43
49
|
return errorCodesMapping.INSUFFICIENT_FUNDS;
|
|
44
50
|
}
|
|
51
|
+
if (isMagicInsufficientFundsError(error)) {
|
|
52
|
+
return errorCodesMapping.INSUFFICIENT_FUNDS;
|
|
53
|
+
}
|
|
45
54
|
const code = getCode(error);
|
|
46
55
|
if (code !== undefined && errorCodesMapping[code]) {
|
|
47
56
|
return errorCodesMapping[code];
|
|
@@ -51,5 +60,11 @@ const transactionErrorMessage = (err) => {
|
|
|
51
60
|
}
|
|
52
61
|
return 'Something went wrong.';
|
|
53
62
|
};
|
|
63
|
+
const isMagicInsufficientFundsError = (error) => {
|
|
64
|
+
const code = getCode(error);
|
|
65
|
+
const message = getMessage(error);
|
|
66
|
+
return (code === magicRpcError &&
|
|
67
|
+
Boolean(message === null || message === void 0 ? void 0 : message.includes('insufficient funds for gas * price + value')));
|
|
68
|
+
};
|
|
54
69
|
|
|
55
70
|
export { transactionErrorMessage };
|
package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.cjs
CHANGED
|
@@ -22,12 +22,14 @@ require('../../../../shared/consts/index.cjs');
|
|
|
22
22
|
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
23
23
|
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
24
24
|
require('@dynamic-labs/multi-wallet');
|
|
25
|
+
require('../../../../config/ApiEndpoint.cjs');
|
|
26
|
+
require('react-international-phone');
|
|
25
27
|
require('viem/chains');
|
|
26
28
|
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
27
29
|
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
28
|
-
require('../../../../
|
|
29
|
-
require('../../../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
30
|
+
require('../../../../context/VerificationContext/VerificationContext.cjs');
|
|
30
31
|
require('react-dom');
|
|
32
|
+
require('../../../../context/WalletContext/WalletContext.cjs');
|
|
31
33
|
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
32
34
|
var usePromise = require('../../../../utils/hooks/usePromise/usePromise.cjs');
|
|
33
35
|
require('@dynamic-labs/types');
|
|
@@ -43,43 +45,51 @@ require('../../../../components/Alert/Alert.cjs');
|
|
|
43
45
|
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
44
46
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
45
47
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
48
|
+
require('../../../../components/Input/Input.cjs');
|
|
46
49
|
require('../../../../components/IsBrowser/IsBrowser.cjs');
|
|
47
50
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
48
51
|
require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
49
52
|
require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
50
53
|
require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
54
|
+
require('../../../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
55
|
+
require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
51
56
|
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
52
57
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
53
58
|
require('react-focus-lock');
|
|
54
|
-
require('formik');
|
|
55
|
-
require('i18next');
|
|
56
|
-
require('../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
57
|
-
require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
58
|
-
require('../../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
59
59
|
require('../../../WalletList/WalletList.cjs');
|
|
60
|
+
require('formik');
|
|
60
61
|
require('qrcode');
|
|
61
62
|
require('@hcaptcha/react-hcaptcha');
|
|
62
63
|
require('../../../../context/LoadingContext/LoadingContext.cjs');
|
|
63
64
|
require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
64
65
|
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
65
66
|
require('../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
67
|
+
require('i18next');
|
|
66
68
|
require('../../../../context/FooterAnimationContext/index.cjs');
|
|
69
|
+
require('../../../LoginView/sections/PhoneNumberSignInSection/usePhoneInputLogic/usePhoneInputLogic.cjs');
|
|
70
|
+
require('../../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
67
71
|
require('../../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
68
72
|
require('../../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
69
73
|
require('../../../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
70
|
-
require('
|
|
74
|
+
require('../../helpers/transactionErrorMessage.cjs');
|
|
71
75
|
require('../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
72
76
|
|
|
73
|
-
const useTransactionGas = ({ provider, transaction, }) => {
|
|
77
|
+
const useTransactionGas = ({ provider, transaction, getGasPrice, }) => {
|
|
74
78
|
const { data: estimatedGas, isLoading: isEstimatedGasLoading } = useTransactionEstimatedGas.useTransactionEstimatedGas(provider, transaction);
|
|
75
79
|
const { data: gasPrice, isLoading: isLoadingGasPrice } = usePromise.usePromise(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
76
80
|
if (transaction.gasPrice) {
|
|
77
81
|
const { gasPrice } = transaction;
|
|
78
82
|
return gasPrice;
|
|
79
83
|
}
|
|
80
|
-
|
|
84
|
+
if (getGasPrice) {
|
|
85
|
+
return getGasPrice(transaction);
|
|
86
|
+
}
|
|
87
|
+
if (provider.getGasPrice) {
|
|
88
|
+
return provider.getGasPrice();
|
|
89
|
+
}
|
|
90
|
+
return BigInt(0);
|
|
81
91
|
}), {
|
|
82
|
-
deps: [transaction.gasPrice],
|
|
92
|
+
deps: [transaction.gasPrice, getGasPrice, provider],
|
|
83
93
|
});
|
|
84
94
|
const gasTotalPrice = React.useMemo(() => (gasPrice && estimatedGas ? gasPrice * estimatedGas : undefined), [gasPrice, estimatedGas]);
|
|
85
95
|
const isLoading = isEstimatedGasLoading || isLoadingGasPrice;
|
package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IUITransaction } from '@dynamic-labs/types';
|
|
2
2
|
type UseTransactionGasProps = {
|
|
3
|
-
provider:
|
|
4
|
-
transaction:
|
|
3
|
+
provider: unknown;
|
|
4
|
+
transaction: IUITransaction;
|
|
5
|
+
getGasPrice?: (_: IUITransaction) => Promise<bigint> | undefined;
|
|
5
6
|
};
|
|
6
|
-
export declare const useTransactionGas: ({ provider, transaction, }: UseTransactionGasProps) => {
|
|
7
|
+
export declare const useTransactionGas: ({ provider, transaction, getGasPrice, }: UseTransactionGasProps) => {
|
|
7
8
|
gasTotalPrice: bigint | undefined;
|
|
8
9
|
isGasEstimated: boolean;
|
|
9
10
|
isLoading: boolean;
|