@dynamic-labs/sdk-react-core 4.5.0 → 4.5.2
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 +22 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +12 -12
- package/src/index.cjs +7 -7
- package/src/index.js +2 -2
- package/src/lib/components/Alert/Alert.cjs +6 -3
- package/src/lib/components/Alert/Alert.d.ts +1 -0
- package/src/lib/components/Alert/Alert.js +6 -4
- package/src/lib/components/Alert/AlertText/AlertText.cjs +16 -0
- package/src/lib/components/Alert/AlertText/AlertText.d.ts +7 -0
- package/src/lib/components/Alert/AlertText/AlertText.js +12 -0
- package/src/lib/components/Alert/AlertText/index.d.ts +1 -0
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +11 -40
- package/src/lib/components/NetworkPicker/NetworkPicker.d.ts +2 -6
- package/src/lib/components/NetworkPicker/NetworkPicker.js +12 -41
- package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.cjs +6 -8
- package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.d.ts +2 -4
- package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.js +6 -8
- package/src/lib/components/NetworkPicker/components/NetworkDropdown/NetworkDropdown.cjs +67 -0
- package/src/lib/components/NetworkPicker/components/NetworkDropdown/NetworkDropdown.d.ts +14 -0
- package/src/lib/components/NetworkPicker/components/NetworkDropdown/NetworkDropdown.js +63 -0
- package/src/lib/components/NetworkPicker/components/NetworkDropdown/index.d.ts +1 -0
- package/src/lib/components/NetworkPicker/components/{EvmNetworkControl/EvmNetworkControl.cjs → NetworkSwitchControl/NetworkSwitchControl.cjs} +27 -36
- package/src/lib/components/NetworkPicker/components/NetworkSwitchControl/NetworkSwitchControl.d.ts +16 -0
- package/src/lib/components/NetworkPicker/components/{EvmNetworkControl/EvmNetworkControl.js → NetworkSwitchControl/NetworkSwitchControl.js} +27 -35
- package/src/lib/components/NetworkPicker/components/NetworkSwitchControl/index.d.ts +1 -0
- package/src/lib/components/Portal/Portal.cjs +3 -2
- package/src/lib/components/Portal/Portal.js +3 -2
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +1 -1
- package/src/lib/components/ShadowDOM/ShadowDOM.cjs +0 -2
- package/src/lib/components/ShadowDOM/ShadowDOM.js +1 -2
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +1 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +1 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -1
- package/src/lib/components/UserProfile/UserProfile.cjs +1 -1
- package/src/lib/components/UserProfile/UserProfile.js +1 -1
- package/src/lib/context/DynamicContext/DynamicContext.cjs +15 -12
- package/src/lib/context/DynamicContext/DynamicContext.js +15 -12
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.cjs +2 -2
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.js +3 -3
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.cjs +0 -4
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.js +0 -4
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.cjs +7 -2
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.js +7 -2
- package/src/lib/context/DynamicContext/hooks/usePasskeySuccessPopup/usePasskeySuccessPopup.cjs +2 -2
- package/src/lib/context/DynamicContext/hooks/usePasskeySuccessPopup/usePasskeySuccessPopup.js +3 -3
- package/src/lib/context/DynamicContext/types/SettingsOverrides.d.ts +5 -2
- package/src/lib/context/ErrorContext/ErrorContext.cjs +7 -6
- package/src/lib/context/ErrorContext/ErrorContext.js +8 -7
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +3 -3
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +3 -3
- package/src/lib/context/ViewContext/ViewContext.cjs +7 -2
- package/src/lib/context/ViewContext/ViewContext.js +7 -2
- package/src/lib/context/ViewContext/types/index.d.ts +1 -1
- package/src/lib/data/api/embeddedWallets/embeddedWallets.cjs +5 -64
- package/src/lib/data/api/embeddedWallets/embeddedWallets.d.ts +2 -18
- package/src/lib/data/api/embeddedWallets/embeddedWallets.js +6 -61
- package/src/lib/data/api/wallets/wallets.cjs +1 -3
- package/src/lib/data/api/wallets/wallets.d.ts +1 -1
- package/src/lib/data/api/wallets/wallets.js +2 -4
- package/src/lib/events/embeddedWallet.d.ts +0 -4
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +2 -6
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +2 -6
- package/src/lib/locale/en/translation.cjs +13 -32
- package/src/lib/locale/en/translation.d.ts +12 -31
- package/src/lib/locale/en/translation.js +13 -32
- package/src/lib/main.global.cjs +1 -1
- package/src/lib/main.global.js +1 -1
- package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.cjs +8 -8
- package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.js +8 -8
- package/src/lib/modals/index.d.ts +0 -2
- package/src/lib/shared/assets/index.d.ts +1 -0
- package/src/lib/shared/assets/{currency.cjs → wallet-with-sunglasses.cjs} +14 -26
- package/src/lib/shared/assets/wallet-with-sunglasses.js +34 -0
- package/src/lib/shared/utils/functions/index.d.ts +0 -2
- package/src/lib/shared/utils/hooks/useLocalStorage/useLocalStorage.cjs +7 -5
- package/src/lib/shared/utils/hooks/useLocalStorage/useLocalStorage.js +8 -6
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/index.d.ts +0 -5
- package/src/lib/utils/functions/isAllowedToLinkWallet/isAllowedToLinkWallet.cjs +1 -1
- package/src/lib/utils/functions/isAllowedToLinkWallet/isAllowedToLinkWallet.js +1 -1
- package/src/lib/utils/functions/isNetworkUnsupported/isNetworkUnsupported.cjs +2 -4
- package/src/lib/utils/functions/isNetworkUnsupported/isNetworkUnsupported.d.ts +2 -2
- package/src/lib/utils/functions/isNetworkUnsupported/isNetworkUnsupported.js +2 -4
- package/src/lib/utils/functions/onrampConfigurationToOnrampOption/onrampConfigurationToOnrampOption.cjs +1 -1
- package/src/lib/utils/functions/onrampConfigurationToOnrampOption/onrampConfigurationToOnrampOption.js +1 -1
- package/src/lib/utils/hooks/index.d.ts +0 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +0 -2
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +0 -2
- package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.cjs +2 -2
- package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.js +3 -3
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +16 -4
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +16 -4
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +3 -3
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +3 -3
- package/src/lib/utils/hooks/useCreateWalletConnectorOptions/useCreateWalletConnectorOptions.cjs +1 -1
- package/src/lib/utils/hooks/useCreateWalletConnectorOptions/useCreateWalletConnectorOptions.js +1 -1
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +1 -6
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +1 -6
- package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.cjs +1 -1
- package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.js +1 -1
- package/src/lib/utils/hooks/useElementById/useElementById.cjs +2 -2
- package/src/lib/utils/hooks/useElementById/useElementById.js +3 -3
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs +1 -13
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js +1 -13
- package/src/lib/utils/hooks/useEmbeddedWallet/index.d.ts +0 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +7 -23
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.d.ts +0 -2
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +7 -23
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.cjs +4 -4
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.js +4 -4
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.cjs +3 -3
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.js +3 -3
- package/src/lib/utils/hooks/useFundWithWallet/useConnectWalletForFunding/useConnectWalletForFunding.cjs +1 -0
- package/src/lib/utils/hooks/useFundWithWallet/useConnectWalletForFunding/useConnectWalletForFunding.js +1 -0
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs +1 -1
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js +1 -1
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +2 -2
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +2 -2
- package/src/lib/utils/hooks/useResetCookieLocalStorage/useResetCookieLocalStorage.cjs +1 -1
- package/src/lib/utils/hooks/useResetCookieLocalStorage/useResetCookieLocalStorage.js +1 -1
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.cjs +11 -18
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.js +12 -19
- package/src/lib/utils/hooks/useTransferWallet/useTransferWallet.cjs +4 -4
- package/src/lib/utils/hooks/useTransferWallet/useTransferWallet.js +4 -4
- package/src/lib/utils/hooks/useUpgradeEmbeddedWallet/useUpgradeEmbeddedWallet.cjs +4 -4
- package/src/lib/utils/hooks/useUpgradeEmbeddedWallet/useUpgradeEmbeddedWallet.js +4 -4
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +4 -4
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +4 -4
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +0 -3
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +0 -3
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +0 -3
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +0 -3
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.cjs +0 -1
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.js +0 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +2 -24
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +2 -24
- package/src/lib/utils/validations/index.d.ts +0 -1
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +2 -4
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +2 -4
- package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.cjs +2 -2
- package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.js +2 -2
- package/src/lib/views/EmailVerification/EmailVerification.cjs +4 -4
- package/src/lib/views/EmailVerification/EmailVerification.js +4 -4
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +12 -34
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +13 -35
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs +2 -2
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js +2 -2
- package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.cjs +1 -1
- package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.js +1 -1
- package/src/lib/views/MfaRecoveryView/MfaRecoveryView.cjs +1 -1
- package/src/lib/views/MfaRecoveryView/MfaRecoveryView.js +1 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +3 -4
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +3 -4
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +1 -1
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +1 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -1
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +11 -11
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +11 -11
- package/src/lib/views/viewToComponentMap.cjs +0 -4
- package/src/lib/views/viewToComponentMap.d.ts +0 -2
- package/src/lib/views/viewToComponentMap.js +0 -4
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +10 -15
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +11 -16
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.cjs +2 -6
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.js +2 -6
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +3 -3
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +3 -3
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +1 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +1 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ChooseOnrampProviderView/ChooseOnrampProviderView.cjs +4 -1
- package/src/lib/widgets/DynamicWidget/views/ChooseOnrampProviderView/ChooseOnrampProviderView.js +4 -1
- package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/ChooseWalletFundingMethod.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/ChooseWalletFundingMethod.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useFundingMethods.cjs +19 -11
- package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useFundingMethods.js +19 -11
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +2 -2
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/ReceiveExternalWalletFunds.cjs +103 -50
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/ReceiveExternalWalletFunds.js +99 -46
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenOption/TokenOption.cjs +21 -10
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenOption/TokenOption.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenOption/TokenOption.js +21 -10
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenSelectScreen.cjs +3 -3
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenSelectScreen.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenSelectScreen.js +3 -3
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/types.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/calculateFiatBalance/calculateFiatBalance.cjs +27 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/calculateFiatBalance/calculateFiatBalance.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/calculateFiatBalance/calculateFiatBalance.js +23 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/calculateFiatBalance/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/convert/convert.cjs +4 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/convert/convert.js +4 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/convertScientificToDecimal/convertScientificToDecimal.cjs +33 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/convertScientificToDecimal/convertScientificToDecimal.d.ts +8 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/convertScientificToDecimal/convertScientificToDecimal.js +29 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/convertScientificToDecimal/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/formatValue.cjs +27 -22
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/formatValue.d.ts +6 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/formatValue.js +27 -22
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/isFiatToken/isFiatToken.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/isFiatToken/isFiatToken.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/isFiatToken/isFiatToken.js +2 -1
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useExchangeRatesForFunding/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useExchangeRatesForFunding/useExchangeRatesForFunding.cjs +32 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useExchangeRatesForFunding/useExchangeRatesForFunding.d.ts +9 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useExchangeRatesForFunding/useExchangeRatesForFunding.js +28 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useSubmitExternalWalletFunding/useSubmitExternalWalletFunding.cjs +14 -2
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useSubmitExternalWalletFunding/useSubmitExternalWalletFunding.js +14 -2
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useTokensForFunding/useTokensForFunding.cjs +27 -15
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useTokensForFunding/useTokensForFunding.js +27 -15
- package/src/lib/widgets/DynamicWidget/views/SettingsView/EmptyScreen/EmptyScreen.cjs +20 -0
- package/src/lib/widgets/DynamicWidget/views/SettingsView/EmptyScreen/EmptyScreen.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/SettingsView/EmptyScreen/EmptyScreen.js +16 -0
- package/src/lib/widgets/DynamicWidget/views/SettingsView/EmptyScreen/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +10 -23
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +11 -24
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.d.ts +0 -23
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/index.d.ts +0 -1
- package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.cjs +0 -113
- package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.js +0 -109
- package/src/lib/modals/CreatePasswordModal/CreatePasswordModal.cjs +0 -106
- package/src/lib/modals/CreatePasswordModal/CreatePasswordModal.d.ts +0 -3
- package/src/lib/modals/CreatePasswordModal/CreatePasswordModal.js +0 -102
- package/src/lib/modals/CreatePasswordModal/CreatePasswordModal.types.d.ts +0 -5
- package/src/lib/modals/CreatePasswordModal/index.d.ts +0 -1
- package/src/lib/modals/EnterPasswordModal/EnterPasswordModal.cjs +0 -106
- package/src/lib/modals/EnterPasswordModal/EnterPasswordModal.d.ts +0 -3
- package/src/lib/modals/EnterPasswordModal/EnterPasswordModal.js +0 -102
- package/src/lib/modals/EnterPasswordModal/EnterPasswordModal.types.d.ts +0 -6
- package/src/lib/modals/EnterPasswordModal/index.d.ts +0 -1
- package/src/lib/shared/assets/alt-key.cjs +0 -55
- package/src/lib/shared/assets/alt-key.js +0 -31
- package/src/lib/shared/assets/currency.js +0 -46
- package/src/lib/shared/assets/lock.cjs +0 -55
- package/src/lib/shared/assets/lock.js +0 -31
- package/src/lib/shared/assets/save-password-hero.cjs +0 -128
- package/src/lib/shared/assets/save-password-hero.js +0 -104
- package/src/lib/shared/assets/wallet-claim-hero.cjs +0 -128
- package/src/lib/shared/assets/wallet-claim-hero.js +0 -104
- package/src/lib/shared/utils/functions/generateRandomPassword/generateRandomPassword.cjs +0 -15
- package/src/lib/shared/utils/functions/generateRandomPassword/generateRandomPassword.d.ts +0 -1
- package/src/lib/shared/utils/functions/generateRandomPassword/generateRandomPassword.js +0 -11
- package/src/lib/shared/utils/functions/generateRandomPassword/index.d.ts +0 -1
- package/src/lib/shared/utils/functions/validatePassword/index.d.ts +0 -1
- package/src/lib/shared/utils/functions/validatePassword/validatePassword.cjs +0 -60
- package/src/lib/shared/utils/functions/validatePassword/validatePassword.d.ts +0 -13
- package/src/lib/shared/utils/functions/validatePassword/validatePassword.js +0 -56
- package/src/lib/utils/functions/findCoinbaseMPCWallet/findCoinbaseMPCWallet.cjs +0 -8
- package/src/lib/utils/functions/findCoinbaseMPCWallet/findCoinbaseMPCWallet.d.ts +0 -2
- package/src/lib/utils/functions/findCoinbaseMPCWallet/findCoinbaseMPCWallet.js +0 -4
- package/src/lib/utils/functions/findCoinbaseMPCWallet/index.d.ts +0 -1
- package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/getCoinbaseMPCConnectorFetchers.cjs +0 -53
- package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/getCoinbaseMPCConnectorFetchers.d.ts +0 -9
- package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/getCoinbaseMPCConnectorFetchers.js +0 -49
- package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/index.d.ts +0 -1
- package/src/lib/utils/functions/isCoinbaseWaasEnabled/isCoinbaseWaasEnabled.cjs +0 -14
- package/src/lib/utils/functions/isCoinbaseWaasEnabled/isCoinbaseWaasEnabled.js +0 -10
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWallet/index.d.ts +0 -1
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWallet/requiresPasswordForEmbeddedWallet.cjs +0 -16
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWallet/requiresPasswordForEmbeddedWallet.d.ts +0 -2
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWallet/requiresPasswordForEmbeddedWallet.js +0 -12
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/index.d.ts +0 -1
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/requiresPasswordForEmbeddedWalletOnSignup.cjs +0 -39
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/requiresPasswordForEmbeddedWalletOnSignup.d.ts +0 -2
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/requiresPasswordForEmbeddedWalletOnSignup.js +0 -35
- package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/index.d.ts +0 -2
- package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/index.d.ts +0 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.cjs +0 -229
- package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.d.ts +0 -5
- package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.js +0 -225
- package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useMPCEmbeddedWallet.cjs +0 -191
- package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useMPCEmbeddedWallet.d.ts +0 -18
- package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useMPCEmbeddedWallet.js +0 -187
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/index.d.ts +0 -1
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.cjs +0 -141
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.d.ts +0 -4
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.js +0 -137
- package/src/lib/utils/validations/validateMPCProviderEnabled/index.d.ts +0 -1
- package/src/lib/utils/validations/validateMPCProviderEnabled/validateMPCProviderEnabled.cjs +0 -18
- package/src/lib/utils/validations/validateMPCProviderEnabled/validateMPCProviderEnabled.d.ts +0 -2
- package/src/lib/utils/validations/validateMPCProviderEnabled/validateMPCProviderEnabled.js +0 -14
- package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.cjs +0 -116
- package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.d.ts +0 -2
- package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.js +0 -112
- package/src/lib/views/CoinbaseMPCClaimIntro/index.d.ts +0 -1
- package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.cjs +0 -197
- package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.d.ts +0 -12
- package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.js +0 -193
- package/src/lib/views/CreatePasswordView/CreatePasswordStep/index.d.ts +0 -1
- package/src/lib/views/CreatePasswordView/CreatePasswordView.cjs +0 -169
- package/src/lib/views/CreatePasswordView/CreatePasswordView.d.ts +0 -9
- package/src/lib/views/CreatePasswordView/CreatePasswordView.js +0 -165
- package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.cjs +0 -141
- package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.d.ts +0 -12
- package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.js +0 -137
- package/src/lib/views/CreatePasswordView/SavePasswordStep/index.d.ts +0 -1
- package/src/lib/views/CreatePasswordView/index.d.ts +0 -1
- package/src/lib/views/EnterPasswordView/EnterPasswordView.cjs +0 -141
- package/src/lib/views/EnterPasswordView/EnterPasswordView.d.ts +0 -8
- package/src/lib/views/EnterPasswordView/EnterPasswordView.js +0 -137
- package/src/lib/views/EnterPasswordView/index.d.ts +0 -1
|
@@ -4,16 +4,14 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
|
4
4
|
import { useState, useRef, useEffect, useMemo } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { DynamicError, AccessBlockedError } from '@dynamic-labs/utils';
|
|
7
|
-
import {
|
|
7
|
+
import { isSessionKeyCompatibleWalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
8
8
|
import { Badge } from '../../../components/Badge/Badge.js';
|
|
9
9
|
import { Checkbox } from '../../../components/Checkbox/Checkbox.js';
|
|
10
10
|
import { ErrorContainer } from '../../../components/ErrorContainer/ErrorContainer.js';
|
|
11
11
|
import { IconButton } from '../../../components/IconButton/IconButton.js';
|
|
12
12
|
import { ModalHeader } from '../../../components/ModalHeader/ModalHeader.js';
|
|
13
|
-
import { useShadowDOMContext } from '../../../components/ShadowDOM/ShadowDOM.js';
|
|
14
13
|
import { Typography } from '../../../components/Typography/Typography.js';
|
|
15
14
|
import { TypographyButton } from '../../../components/TypographyButton/TypographyButton.js';
|
|
16
|
-
import ApiEndpoint from '../../../config/ApiEndpoint.js';
|
|
17
15
|
import '../../../context/DynamicContext/DynamicContext.js';
|
|
18
16
|
import '@dynamic-labs/sdk-api-core';
|
|
19
17
|
import { logger } from '../../../shared/logger.js';
|
|
@@ -35,6 +33,7 @@ import '@dynamic-labs/multi-wallet';
|
|
|
35
33
|
import 'react-international-phone';
|
|
36
34
|
import '../../../store/state/nonce/nonce.js';
|
|
37
35
|
import '../../../store/state/projectSettings/projectSettings.js';
|
|
36
|
+
import '../../../config/ApiEndpoint.js';
|
|
38
37
|
import '../../../store/state/user/user.js';
|
|
39
38
|
import '../../../locale/locale.js';
|
|
40
39
|
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
@@ -68,6 +67,7 @@ import '../../../store/state/loadingAndLifecycle.js';
|
|
|
68
67
|
import '../../../store/state/walletOptions/walletOptions.js';
|
|
69
68
|
import '../../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
70
69
|
import '../../../components/Alert/Alert.js';
|
|
70
|
+
import '../../../components/ShadowDOM/ShadowDOM.js';
|
|
71
71
|
import '../../../components/InlineWidget/InlineWidget.js';
|
|
72
72
|
import '../../../components/Input/Input.js';
|
|
73
73
|
import '../../../components/IsBrowser/IsBrowser.js';
|
|
@@ -109,21 +109,18 @@ import '../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
|
109
109
|
import { useInternalDynamicContext } from '../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.js';
|
|
110
110
|
|
|
111
111
|
const EmbeddedRevealView = ({ exportPrivateKey, isPromptForExport = false, }) => {
|
|
112
|
-
var _a, _b, _c
|
|
112
|
+
var _a, _b, _c;
|
|
113
113
|
const { primaryWallet, user, setShowAuthFlow, environmentId } = useInternalDynamicContext();
|
|
114
114
|
const { handleAcknowledgeExportPrompt } = useSyncEmbeddedWalletFlow();
|
|
115
115
|
const { isTurnkeyWallet } = useIsTurnkeyWallet();
|
|
116
|
-
const { shadowRoot } = useShadowDOMContext();
|
|
117
116
|
const { setDynamicWidgetView } = useWidgetContext();
|
|
118
117
|
const { pushView } = useViewContext();
|
|
119
118
|
const { getEOAWallet, isSmartWallet } = useSmartWallets();
|
|
120
119
|
const [acknowledgement1, setAcknowledgement1] = useState(false);
|
|
121
|
-
const [hasRevealedCoinbaseMpcKey, setHasRevealedCoinbaseMpcKey] = useState(false);
|
|
122
120
|
const iframeContainerRef = useRef(null);
|
|
123
121
|
const walletProperties = (_b = (_a = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _a === void 0 ? void 0 : _a.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'))) === null || _b === void 0 ? void 0 : _b.walletProperties;
|
|
124
122
|
const isTurnkeyHDWallet = walletProperties === null || walletProperties === void 0 ? void 0 : walletProperties.turnkeyHDWalletId;
|
|
125
123
|
const wallet = (_c = (primaryWallet && getEOAWallet(primaryWallet))) !== null && _c !== void 0 ? _c : primaryWallet;
|
|
126
|
-
const isCoinbaseMpcWallet = wallet && isCoinbaseMpcWalletConnector(wallet.connector);
|
|
127
124
|
// eslint-disable-next-line arrow-body-style
|
|
128
125
|
useEffect(() => {
|
|
129
126
|
return () => {
|
|
@@ -137,14 +134,14 @@ const EmbeddedRevealView = ({ exportPrivateKey, isPromptForExport = false, }) =>
|
|
|
137
134
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
138
135
|
}, []);
|
|
139
136
|
const { isLoading: exportLoading } = usePromise(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
140
|
-
var
|
|
137
|
+
var _d, _e;
|
|
141
138
|
const iframeContainerElement = iframeContainerRef.current;
|
|
142
139
|
if (!iframeContainerElement ||
|
|
143
|
-
((
|
|
140
|
+
((_d = iframeContainerElement === null || iframeContainerElement === void 0 ? void 0 : iframeContainerElement.children) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
|
144
141
|
return;
|
|
145
142
|
}
|
|
146
143
|
if (isSessionKeyCompatibleWalletConnector(wallet === null || wallet === void 0 ? void 0 : wallet.connector)) {
|
|
147
|
-
yield ((
|
|
144
|
+
yield ((_e = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _e === void 0 ? void 0 : _e.createOrRestoreSession());
|
|
148
145
|
}
|
|
149
146
|
return initExport({
|
|
150
147
|
iframeContainer: iframeContainerElement,
|
|
@@ -153,11 +150,8 @@ const EmbeddedRevealView = ({ exportPrivateKey, isPromptForExport = false, }) =>
|
|
|
153
150
|
});
|
|
154
151
|
}));
|
|
155
152
|
const { mutate: handleExportWallet, isLoading, error, data, } = useMutation(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
156
|
-
var _g, _h
|
|
153
|
+
var _f, _g, _h;
|
|
157
154
|
handleAcknowledgeExportPrompt();
|
|
158
|
-
if (isCoinbaseMpcWallet) {
|
|
159
|
-
return (wallet === null || wallet === void 0 ? void 0 : wallet.connector).exportWalletKeys();
|
|
160
|
-
}
|
|
161
155
|
if (isTurnkeyWallet) {
|
|
162
156
|
try {
|
|
163
157
|
return yield exportCredential({
|
|
@@ -167,11 +161,11 @@ const EmbeddedRevealView = ({ exportPrivateKey, isPromptForExport = false, }) =>
|
|
|
167
161
|
wallet: wallet,
|
|
168
162
|
});
|
|
169
163
|
}
|
|
170
|
-
catch (
|
|
164
|
+
catch (_j) {
|
|
171
165
|
if (isSessionKeyCompatibleWalletConnector(wallet === null || wallet === void 0 ? void 0 : wallet.connector) &&
|
|
172
|
-
((
|
|
173
|
-
yield ((
|
|
174
|
-
yield ((
|
|
166
|
+
((_f = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _f === void 0 ? void 0 : _f.removeSessionKeys)) {
|
|
167
|
+
yield ((_g = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _g === void 0 ? void 0 : _g.removeSessionKeys());
|
|
168
|
+
yield ((_h = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _h === void 0 ? void 0 : _h.createOrRestoreSession({
|
|
175
169
|
ignoreRestore: true,
|
|
176
170
|
}));
|
|
177
171
|
}
|
|
@@ -189,17 +183,6 @@ const EmbeddedRevealView = ({ exportPrivateKey, isPromptForExport = false, }) =>
|
|
|
189
183
|
logger.error('Failed to export', err);
|
|
190
184
|
dynamicEvents.emit('embeddedWalletRevealFailed', err);
|
|
191
185
|
},
|
|
192
|
-
onSuccess: (data) => {
|
|
193
|
-
var _a, _b;
|
|
194
|
-
if (isCoinbaseMpcWallet && data && (data === null || data === void 0 ? void 0 : data.length)) {
|
|
195
|
-
const iframe = shadowRoot === null || shadowRoot === void 0 ? void 0 : shadowRoot.getElementById('coinbase-waas-key-export');
|
|
196
|
-
(_a = iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage({
|
|
197
|
-
key: (_b = data[0]) === null || _b === void 0 ? void 0 : _b.ecKeyPrivate,
|
|
198
|
-
type: 'export_key',
|
|
199
|
-
}, '*');
|
|
200
|
-
setHasRevealedCoinbaseMpcKey(true);
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
186
|
});
|
|
204
187
|
const errorText = useMemo(() => {
|
|
205
188
|
if (!error) {
|
|
@@ -252,15 +235,10 @@ const EmbeddedRevealView = ({ exportPrivateKey, isPromptForExport = false, }) =>
|
|
|
252
235
|
return t('dyn_embedded_reveal.agreement_title');
|
|
253
236
|
};
|
|
254
237
|
const title = getTitle();
|
|
255
|
-
// this element needs to be on the DOM before the reveal occurs
|
|
256
|
-
// so we can inject the key into it once it's fetched from coinbase.
|
|
257
|
-
const coinbaseWaasKeyExportIframe = (jsx("iframe", { src: (_d = ApiEndpoint === null || ApiEndpoint === void 0 ? void 0 : ApiEndpoint.getBaseUrl()) === null || _d === void 0 ? void 0 : _d.replace('api/v0', 'coinbase-waas-key-export.html'), id: 'coinbase-waas-key-export', title: 'Coinbase WaaS key export', height: hasRevealedCoinbaseMpcKey ? '100%' : 0, width: hasRevealedCoinbaseMpcKey ? '100%' : 0, style: {
|
|
258
|
-
borderRadius: '0.75rem',
|
|
259
|
-
}, allow: 'clipboard-write' }));
|
|
260
238
|
const handleClickUnlink = () => {
|
|
261
239
|
pushView('embedded-delete-view');
|
|
262
240
|
};
|
|
263
|
-
return (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: isPromptForExport ? null : closeButton, children: jsx(Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: title }) }), jsx("div", { className: 'embedded-reveal-view', children: jsxs("div", { className: 'embedded-reveal-view__body', children: [contentHeader,
|
|
241
|
+
return (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: isPromptForExport ? null : closeButton, children: jsx(Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: title }) }), jsx("div", { className: 'embedded-reveal-view', children: jsxs("div", { className: 'embedded-reveal-view__body', children: [contentHeader, isTurnkeyWallet ? (jsx("div", { id: iframeContainerId, style: { display: data ? 'block' : 'none' }, ref: iframeContainerRef })) : null, hasInjectedCredential ? (jsxs(Fragment, { children: [jsx(TypographyButton, { buttonPadding: 'large', buttonVariant: 'brand-primary', onClick: () => setShowAuthFlow(false), loading: isLoading, copykey: 'dyn_embedded_reveal.done_button_label', typographyProps: {
|
|
264
242
|
color: 'inherit',
|
|
265
243
|
}, children: t('dyn_embedded_reveal.done_button_label') }), !exportPrivateKey && (jsx(TypographyButton, { buttonClassName: 'embedded-reveal-view__body__unlink_button', buttonVariant: 'tertiary', buttonPadding: 'none', copykey: 'dyn_embedded_reveal.unlink', onClick: handleClickUnlink, typographyProps: {
|
|
266
244
|
color: 'secondary',
|
package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs
CHANGED
|
@@ -30,11 +30,11 @@ require('react-international-phone');
|
|
|
30
30
|
var getCustomCountries = require('../../../../utils/functions/getCustomCountries/getCustomCountries.cjs');
|
|
31
31
|
require('../../../../store/state/nonce/nonce.cjs');
|
|
32
32
|
require('../../../../store/state/projectSettings/projectSettings.cjs');
|
|
33
|
+
var getSupportedCountriesForVerificationFromProjectSettings = require('../../../../utils/functions/getSupportedCountriesForVerificationFromProjectSettings/getSupportedCountriesForVerificationFromProjectSettings.cjs');
|
|
34
|
+
var getDefaultCountriesIfEmpty = require('../../../../utils/functions/getDefaultCountriesIfEmpty/getDefaultCountriesIfEmpty.cjs');
|
|
33
35
|
require('../../../../config/ApiEndpoint.cjs');
|
|
34
36
|
require('../../../../store/state/user/user.cjs');
|
|
35
37
|
require('../../../../locale/locale.cjs');
|
|
36
|
-
var getSupportedCountriesForVerificationFromProjectSettings = require('../../../../utils/functions/getSupportedCountriesForVerificationFromProjectSettings/getSupportedCountriesForVerificationFromProjectSettings.cjs');
|
|
37
|
-
var getDefaultCountriesIfEmpty = require('../../../../utils/functions/getDefaultCountriesIfEmpty/getDefaultCountriesIfEmpty.cjs');
|
|
38
38
|
require('../../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
39
39
|
require('../../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
40
40
|
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js
CHANGED
|
@@ -26,11 +26,11 @@ import 'react-international-phone';
|
|
|
26
26
|
import { getCustomCountries } from '../../../../utils/functions/getCustomCountries/getCustomCountries.js';
|
|
27
27
|
import '../../../../store/state/nonce/nonce.js';
|
|
28
28
|
import '../../../../store/state/projectSettings/projectSettings.js';
|
|
29
|
+
import { getSupportedCountriesForVerificationFromProjectSettings } from '../../../../utils/functions/getSupportedCountriesForVerificationFromProjectSettings/getSupportedCountriesForVerificationFromProjectSettings.js';
|
|
30
|
+
import { getDefaultCountriesIfEmpty } from '../../../../utils/functions/getDefaultCountriesIfEmpty/getDefaultCountriesIfEmpty.js';
|
|
29
31
|
import '../../../../config/ApiEndpoint.js';
|
|
30
32
|
import '../../../../store/state/user/user.js';
|
|
31
33
|
import '../../../../locale/locale.js';
|
|
32
|
-
import { getSupportedCountriesForVerificationFromProjectSettings } from '../../../../utils/functions/getSupportedCountriesForVerificationFromProjectSettings/getSupportedCountriesForVerificationFromProjectSettings.js';
|
|
33
|
-
import { getDefaultCountriesIfEmpty } from '../../../../utils/functions/getDefaultCountriesIfEmpty/getDefaultCountriesIfEmpty.js';
|
|
34
34
|
import '../../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
35
35
|
import '../../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
36
36
|
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
@@ -30,10 +30,10 @@ require('@dynamic-labs/multi-wallet');
|
|
|
30
30
|
require('react-international-phone');
|
|
31
31
|
require('../../store/state/nonce/nonce.cjs');
|
|
32
32
|
require('../../store/state/projectSettings/projectSettings.cjs');
|
|
33
|
+
var downloadFile = require('../../utils/functions/downloadFile/downloadFile.cjs');
|
|
33
34
|
require('../../config/ApiEndpoint.cjs');
|
|
34
35
|
require('../../store/state/user/user.cjs');
|
|
35
36
|
require('../../locale/locale.cjs');
|
|
36
|
-
var downloadFile = require('../../utils/functions/downloadFile/downloadFile.cjs');
|
|
37
37
|
require('../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
38
38
|
require('../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
39
39
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
@@ -26,10 +26,10 @@ import '@dynamic-labs/multi-wallet';
|
|
|
26
26
|
import 'react-international-phone';
|
|
27
27
|
import '../../store/state/nonce/nonce.js';
|
|
28
28
|
import '../../store/state/projectSettings/projectSettings.js';
|
|
29
|
+
import { downloadFile } from '../../utils/functions/downloadFile/downloadFile.js';
|
|
29
30
|
import '../../config/ApiEndpoint.js';
|
|
30
31
|
import '../../store/state/user/user.js';
|
|
31
32
|
import '../../locale/locale.js';
|
|
32
|
-
import { downloadFile } from '../../utils/functions/downloadFile/downloadFile.js';
|
|
33
33
|
import '../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
34
34
|
import '../../store/state/primaryWalletId/primaryWalletId.js';
|
|
35
35
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
@@ -28,10 +28,10 @@ require('@dynamic-labs/multi-wallet');
|
|
|
28
28
|
require('react-international-phone');
|
|
29
29
|
require('../../store/state/nonce/nonce.cjs');
|
|
30
30
|
require('../../store/state/projectSettings/projectSettings.cjs');
|
|
31
|
+
var isValidMfaRecoveryCode = require('../../utils/functions/isValidMfaRecoveryCode/isValidMfaRecoveryCode.cjs');
|
|
31
32
|
require('../../config/ApiEndpoint.cjs');
|
|
32
33
|
require('../../store/state/user/user.cjs');
|
|
33
34
|
require('../../locale/locale.cjs');
|
|
34
|
-
var isValidMfaRecoveryCode = require('../../utils/functions/isValidMfaRecoveryCode/isValidMfaRecoveryCode.cjs');
|
|
35
35
|
require('../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
36
36
|
require('../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
37
37
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
@@ -24,10 +24,10 @@ import '@dynamic-labs/multi-wallet';
|
|
|
24
24
|
import 'react-international-phone';
|
|
25
25
|
import '../../store/state/nonce/nonce.js';
|
|
26
26
|
import '../../store/state/projectSettings/projectSettings.js';
|
|
27
|
+
import { isValidMfaRecoveryCode } from '../../utils/functions/isValidMfaRecoveryCode/isValidMfaRecoveryCode.js';
|
|
27
28
|
import '../../config/ApiEndpoint.js';
|
|
28
29
|
import '../../store/state/user/user.js';
|
|
29
30
|
import '../../locale/locale.js';
|
|
30
|
-
import { isValidMfaRecoveryCode } from '../../utils/functions/isValidMfaRecoveryCode/isValidMfaRecoveryCode.js';
|
|
31
31
|
import '../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
32
32
|
import '../../store/state/primaryWalletId/primaryWalletId.js';
|
|
33
33
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
@@ -5,12 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var _tslib = require('../../../../_virtual/_tslib.cjs');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
-
var React = require('react');
|
|
9
8
|
var reactI18next = require('react-i18next');
|
|
10
9
|
var walletBook = require('@dynamic-labs/wallet-book');
|
|
11
10
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
12
11
|
require('../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
13
12
|
require('../../components/Alert/Alert.cjs');
|
|
13
|
+
require('react');
|
|
14
14
|
require('../../events/dynamicEvents.cjs');
|
|
15
15
|
require('@dynamic-labs/utils');
|
|
16
16
|
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
@@ -104,7 +104,6 @@ const NetworkNotSupported = () => {
|
|
|
104
104
|
const { onboardingImageUrl, selectedWalletConnector: walletConnector } = useInternalDynamicContext.useInternalDynamicContext();
|
|
105
105
|
const { t } = reactI18next.useTranslation();
|
|
106
106
|
const { currentNetwork } = useNetworkNotSupported.useNetworkNotSupported();
|
|
107
|
-
const [isNetworkPickerOpen, setIsNetworkPickerOpen] = React.useState(false);
|
|
108
107
|
if (!walletConnector) {
|
|
109
108
|
return null;
|
|
110
109
|
}
|
|
@@ -118,14 +117,14 @@ const NetworkNotSupported = () => {
|
|
|
118
117
|
logger.logger.debug(e);
|
|
119
118
|
}
|
|
120
119
|
});
|
|
121
|
-
const
|
|
120
|
+
const enabledNetworks = walletConnector.getEnabledNetworks();
|
|
122
121
|
const _isSupportedNetwork = isSupportedNetwork.isSupportedNetwork({
|
|
123
122
|
network: currentNetwork,
|
|
124
123
|
walletConnector,
|
|
125
124
|
});
|
|
126
125
|
return (jsxRuntime.jsxs("div", { className: 'network-not-supported', "data-testid": 'network-not-supported', children: [onboardingImageUrl && (jsxRuntime.jsx("img", { className: 'network-not-supported__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { variant: 'info', withIcon: false, className: 'network-not-supported__error--not-supported', copykey: 'dyn_network_not_supported.warning_message', children: t('dyn_network_not_supported.warning_message') })), jsxRuntime.jsxs("div", { className: classNames.classNames('network-not-supported__content-container', {
|
|
127
126
|
'network-not-supported__content-container--error': !_isSupportedNetwork,
|
|
128
|
-
}), children: [jsxRuntime.jsx("div", { className: 'network-not-supported__img-container', children: jsxRuntime.jsx(walletBook.WalletIcon, { style: { height: 64, width: 64 }, icon: walletConnector.metadata.icon, walletKey: walletConnector.key }) }), jsxRuntime.jsx(UserAddress.UserAddress, { walletConnector: walletConnector }), jsxRuntime.jsx("div", { className: 'network-not-supported__network-container', children:
|
|
127
|
+
}), children: [jsxRuntime.jsx("div", { className: 'network-not-supported__img-container', children: jsxRuntime.jsx(walletBook.WalletIcon, { style: { height: 64, width: 64 }, icon: walletConnector.metadata.icon, walletKey: walletConnector.key }) }), jsxRuntime.jsx(UserAddress.UserAddress, { walletConnector: walletConnector }), jsxRuntime.jsx("div", { className: 'network-not-supported__network-container', children: enabledNetworks.length > 1 && (jsxRuntime.jsx(NetworkPicker.NetworkPicker, { currentNetwork: currentNetwork, connector: walletConnector, showNetworkName: true, buttonClassName: 'network-not-supported__network-picker-button', mainClassName: 'network-not-supported__network-picker' })) }), jsxRuntime.jsx("div", { className: 'network-not-supported__welcome-container', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_network_not_supported.subtitle', children: t('dyn_network_not_supported.subtitle') }) }), enabledNetworks.length === 1 && (jsxRuntime.jsx(SelectNetworkButton.SelectNetworkButton, { onClick: onSelectNetworkButtonClick, networkId: enabledNetworks[0].networkId, networkName: enabledNetworks[0].vanityName || enabledNetworks[0].name, networkIconUrl: enabledNetworks[0].iconUrls[0] }))] })] }));
|
|
129
128
|
};
|
|
130
129
|
|
|
131
130
|
exports.NetworkNotSupported = NetworkNotSupported;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
-
import { useState } from 'react';
|
|
5
4
|
import { useTranslation } from 'react-i18next';
|
|
6
5
|
import { WalletIcon } from '@dynamic-labs/wallet-book';
|
|
7
6
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
8
7
|
import '../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
9
8
|
import '../../components/Alert/Alert.js';
|
|
9
|
+
import 'react';
|
|
10
10
|
import '../../events/dynamicEvents.js';
|
|
11
11
|
import '@dynamic-labs/utils';
|
|
12
12
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
@@ -100,7 +100,6 @@ const NetworkNotSupported = () => {
|
|
|
100
100
|
const { onboardingImageUrl, selectedWalletConnector: walletConnector } = useInternalDynamicContext();
|
|
101
101
|
const { t } = useTranslation();
|
|
102
102
|
const { currentNetwork } = useNetworkNotSupported();
|
|
103
|
-
const [isNetworkPickerOpen, setIsNetworkPickerOpen] = useState(false);
|
|
104
103
|
if (!walletConnector) {
|
|
105
104
|
return null;
|
|
106
105
|
}
|
|
@@ -114,14 +113,14 @@ const NetworkNotSupported = () => {
|
|
|
114
113
|
logger.debug(e);
|
|
115
114
|
}
|
|
116
115
|
});
|
|
117
|
-
const
|
|
116
|
+
const enabledNetworks = walletConnector.getEnabledNetworks();
|
|
118
117
|
const _isSupportedNetwork = isSupportedNetwork({
|
|
119
118
|
network: currentNetwork,
|
|
120
119
|
walletConnector,
|
|
121
120
|
});
|
|
122
121
|
return (jsxs("div", { className: 'network-not-supported', "data-testid": 'network-not-supported', children: [onboardingImageUrl && (jsx("img", { className: 'network-not-supported__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsx(ErrorContainer, { variant: 'info', withIcon: false, className: 'network-not-supported__error--not-supported', copykey: 'dyn_network_not_supported.warning_message', children: t('dyn_network_not_supported.warning_message') })), jsxs("div", { className: classNames('network-not-supported__content-container', {
|
|
123
122
|
'network-not-supported__content-container--error': !_isSupportedNetwork,
|
|
124
|
-
}), children: [jsx("div", { className: 'network-not-supported__img-container', children: jsx(WalletIcon, { style: { height: 64, width: 64 }, icon: walletConnector.metadata.icon, walletKey: walletConnector.key }) }), jsx(UserAddress, { walletConnector: walletConnector }), jsx("div", { className: 'network-not-supported__network-container', children:
|
|
123
|
+
}), children: [jsx("div", { className: 'network-not-supported__img-container', children: jsx(WalletIcon, { style: { height: 64, width: 64 }, icon: walletConnector.metadata.icon, walletKey: walletConnector.key }) }), jsx(UserAddress, { walletConnector: walletConnector }), jsx("div", { className: 'network-not-supported__network-container', children: enabledNetworks.length > 1 && (jsx(NetworkPicker, { currentNetwork: currentNetwork, connector: walletConnector, showNetworkName: true, buttonClassName: 'network-not-supported__network-picker-button', mainClassName: 'network-not-supported__network-picker' })) }), jsx("div", { className: 'network-not-supported__welcome-container', children: jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_network_not_supported.subtitle', children: t('dyn_network_not_supported.subtitle') }) }), enabledNetworks.length === 1 && (jsx(SelectNetworkButton, { onClick: onSelectNetworkButtonClick, networkId: enabledNetworks[0].networkId, networkName: enabledNetworks[0].vanityName || enabledNetworks[0].name, networkIconUrl: enabledNetworks[0].iconUrls[0] }))] })] }));
|
|
125
124
|
};
|
|
126
125
|
|
|
127
126
|
export { NetworkNotSupported };
|
|
@@ -27,10 +27,10 @@ require('@dynamic-labs/multi-wallet');
|
|
|
27
27
|
require('react-international-phone');
|
|
28
28
|
require('../../../store/state/nonce/nonce.cjs');
|
|
29
29
|
require('../../../store/state/projectSettings/projectSettings.cjs');
|
|
30
|
+
var getUserVerifiedCredentialType = require('../../../utils/functions/getUserVerifiedCredentialType/getUserVerifiedCredentialType.cjs');
|
|
30
31
|
require('../../../config/ApiEndpoint.cjs');
|
|
31
32
|
require('../../../store/state/user/user.cjs');
|
|
32
33
|
require('../../../locale/locale.cjs');
|
|
33
|
-
var getUserVerifiedCredentialType = require('../../../utils/functions/getUserVerifiedCredentialType/getUserVerifiedCredentialType.cjs');
|
|
34
34
|
require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
35
35
|
require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
36
36
|
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
@@ -23,10 +23,10 @@ import '@dynamic-labs/multi-wallet';
|
|
|
23
23
|
import 'react-international-phone';
|
|
24
24
|
import '../../../store/state/nonce/nonce.js';
|
|
25
25
|
import '../../../store/state/projectSettings/projectSettings.js';
|
|
26
|
+
import { getUserVerifiedCredentialType } from '../../../utils/functions/getUserVerifiedCredentialType/getUserVerifiedCredentialType.js';
|
|
26
27
|
import '../../../config/ApiEndpoint.js';
|
|
27
28
|
import '../../../store/state/user/user.js';
|
|
28
29
|
import '../../../locale/locale.js';
|
|
29
|
-
import { getUserVerifiedCredentialType } from '../../../utils/functions/getUserVerifiedCredentialType/getUserVerifiedCredentialType.js';
|
|
30
30
|
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
31
31
|
import '../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
32
32
|
import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
@@ -30,10 +30,10 @@ require('@dynamic-labs/multi-wallet');
|
|
|
30
30
|
require('react-international-phone');
|
|
31
31
|
require('../../store/state/nonce/nonce.cjs');
|
|
32
32
|
require('../../store/state/projectSettings/projectSettings.cjs');
|
|
33
|
+
var networksAndChains = require('../../utils/functions/networksAndChains/networksAndChains.cjs');
|
|
33
34
|
require('../../config/ApiEndpoint.cjs');
|
|
34
35
|
require('../../store/state/user/user.cjs');
|
|
35
36
|
require('../../locale/locale.cjs');
|
|
36
|
-
var networksAndChains = require('../../utils/functions/networksAndChains/networksAndChains.cjs');
|
|
37
37
|
require('../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
38
38
|
require('../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
39
39
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
@@ -26,10 +26,10 @@ import '@dynamic-labs/multi-wallet';
|
|
|
26
26
|
import 'react-international-phone';
|
|
27
27
|
import '../../store/state/nonce/nonce.js';
|
|
28
28
|
import '../../store/state/projectSettings/projectSettings.js';
|
|
29
|
+
import { getEvmChainName } from '../../utils/functions/networksAndChains/networksAndChains.js';
|
|
29
30
|
import '../../config/ApiEndpoint.js';
|
|
30
31
|
import '../../store/state/user/user.js';
|
|
31
32
|
import '../../locale/locale.js';
|
|
32
|
-
import { getEvmChainName } from '../../utils/functions/networksAndChains/networksAndChains.js';
|
|
33
33
|
import '../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
34
34
|
import '../../store/state/primaryWalletId/primaryWalletId.js';
|
|
35
35
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
@@ -320,25 +320,25 @@ const TransactionConfirmationView = ({ transaction, onError, onSuccess, mutation
|
|
|
320
320
|
missingFunds === undefined &&
|
|
321
321
|
transaction.fee.gas &&
|
|
322
322
|
!isGasSponsored) {
|
|
323
|
-
return (jsxRuntime.
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
323
|
+
return (jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'warning', copykey: 'dyn_send_transaction.warning_message.insufficient_gas_funds', children: jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', color: 'current-color', "data-testid": 'warning_content', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', copykey: 'dyn_send_transaction.warning_message.insufficient_gas_funds.title', children: t('dyn_send_transaction.warning_message.insufficient_gas_funds.title') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.warning_message.insufficient_gas_funds.description', children: t('dyn_send_transaction.warning_message.insufficient_gas_funds.description', {
|
|
324
|
+
amountLeft: transaction.format(transaction.fee.gas, {
|
|
325
|
+
precision: 6,
|
|
326
|
+
}),
|
|
327
|
+
currencySymbol: currency === null || currency === void 0 ? void 0 : currency.symbol,
|
|
328
|
+
}) })] }) }));
|
|
329
329
|
}
|
|
330
330
|
// Check for insufficient funds
|
|
331
331
|
const showInsufficientFundsWarningMessage = hasInsufficientFunds && missingFunds;
|
|
332
332
|
if (showInsufficientFundsWarningMessage) {
|
|
333
333
|
const amountLeft = transaction.format(missingFunds, { precision: 6 });
|
|
334
|
-
return (jsxRuntime.
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
334
|
+
return (jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'error', copykey: 'dyn_send_transaction.warning_message.insufficient_funds', children: jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', color: 'current-color', "data-testid": 'warning_content', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', copykey: 'dyn_send_transaction.warning_message.insufficient_funds.title', children: t('dyn_send_transaction.warning_message.insufficient_funds.title') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.warning_message.insufficient_funds.description', children: t('dyn_send_transaction.warning_message.insufficient_funds.description', {
|
|
335
|
+
amountLeft,
|
|
336
|
+
currencySymbol: currency === null || currency === void 0 ? void 0 : currency.symbol,
|
|
337
|
+
}) })] }) }));
|
|
338
338
|
}
|
|
339
339
|
// Finally, check for simulation failure
|
|
340
340
|
if (simulationState.status === SimulationStatus.FAILED) {
|
|
341
|
-
return (jsxRuntime.
|
|
341
|
+
return (jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'warning', copykey: 'dyn_send_transaction.warning_message.failed_simulation', children: jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', color: 'current-color', "data-testid": 'warning_content', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', copykey: 'dyn_send_transaction.warning_message.failed_simulation.title', as: 'div', children: t('dyn_send_transaction.warning_message.failed_simulation.title') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.warning_message.failed_simulation.description', as: 'div', children: t('dyn_send_transaction.warning_message.failed_simulation.description') })] }) }));
|
|
342
342
|
}
|
|
343
343
|
return null;
|
|
344
344
|
}, [
|
|
@@ -312,25 +312,25 @@ const TransactionConfirmationView = ({ transaction, onError, onSuccess, mutation
|
|
|
312
312
|
missingFunds === undefined &&
|
|
313
313
|
transaction.fee.gas &&
|
|
314
314
|
!isGasSponsored) {
|
|
315
|
-
return (
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
315
|
+
return (jsx(Alert, { icon: 'error', variant: 'warning', copykey: 'dyn_send_transaction.warning_message.insufficient_gas_funds', children: jsxs(Typography, { variant: 'body_small', color: 'current-color', "data-testid": 'warning_content', children: [jsx(Typography, { variant: 'body_normal', color: 'primary', copykey: 'dyn_send_transaction.warning_message.insufficient_gas_funds.title', children: t('dyn_send_transaction.warning_message.insufficient_gas_funds.title') }), jsx(Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.warning_message.insufficient_gas_funds.description', children: t('dyn_send_transaction.warning_message.insufficient_gas_funds.description', {
|
|
316
|
+
amountLeft: transaction.format(transaction.fee.gas, {
|
|
317
|
+
precision: 6,
|
|
318
|
+
}),
|
|
319
|
+
currencySymbol: currency === null || currency === void 0 ? void 0 : currency.symbol,
|
|
320
|
+
}) })] }) }));
|
|
321
321
|
}
|
|
322
322
|
// Check for insufficient funds
|
|
323
323
|
const showInsufficientFundsWarningMessage = hasInsufficientFunds && missingFunds;
|
|
324
324
|
if (showInsufficientFundsWarningMessage) {
|
|
325
325
|
const amountLeft = transaction.format(missingFunds, { precision: 6 });
|
|
326
|
-
return (
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
326
|
+
return (jsx(Alert, { icon: 'error', variant: 'error', copykey: 'dyn_send_transaction.warning_message.insufficient_funds', children: jsxs(Typography, { variant: 'body_small', color: 'current-color', "data-testid": 'warning_content', children: [jsx(Typography, { variant: 'body_normal', color: 'primary', copykey: 'dyn_send_transaction.warning_message.insufficient_funds.title', children: t('dyn_send_transaction.warning_message.insufficient_funds.title') }), jsx(Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.warning_message.insufficient_funds.description', children: t('dyn_send_transaction.warning_message.insufficient_funds.description', {
|
|
327
|
+
amountLeft,
|
|
328
|
+
currencySymbol: currency === null || currency === void 0 ? void 0 : currency.symbol,
|
|
329
|
+
}) })] }) }));
|
|
330
330
|
}
|
|
331
331
|
// Finally, check for simulation failure
|
|
332
332
|
if (simulationState.status === SimulationStatus.FAILED) {
|
|
333
|
-
return (
|
|
333
|
+
return (jsx(Alert, { icon: 'error', variant: 'warning', copykey: 'dyn_send_transaction.warning_message.failed_simulation', children: jsxs(Typography, { variant: 'body_small', color: 'current-color', "data-testid": 'warning_content', children: [jsx(Typography, { variant: 'body_normal', color: 'primary', copykey: 'dyn_send_transaction.warning_message.failed_simulation.title', as: 'div', children: t('dyn_send_transaction.warning_message.failed_simulation.title') }), jsx(Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_send_transaction.warning_message.failed_simulation.description', as: 'div', children: t('dyn_send_transaction.warning_message.failed_simulation.description') })] }) }));
|
|
334
334
|
}
|
|
335
335
|
return null;
|
|
336
336
|
}, [
|
|
@@ -10,10 +10,8 @@ var BridgeNextWalletConnectionView = require('./BridgeNextWalletConnectionView/B
|
|
|
10
10
|
var BridgeSummaryView = require('./BridgeSummaryView/BridgeSummaryView.cjs');
|
|
11
11
|
var BridgeWelcomeView = require('./BridgeWelcomeView/BridgeWelcomeView.cjs');
|
|
12
12
|
var CaptchaVerifyUser = require('./CaptchaVerifyUser/CaptchaVerifyUser.cjs');
|
|
13
|
-
var CoinbaseMPCClaimIntro = require('./CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.cjs');
|
|
14
13
|
var CollectUserDataView = require('./CollectUserDataView/CollectUserDataView.cjs');
|
|
15
14
|
var CollectUserDataViewNoWallet = require('./CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.cjs');
|
|
16
|
-
var CreatePasswordView = require('./CreatePasswordView/CreatePasswordView.cjs');
|
|
17
15
|
var EmailConfirmationWaitingView = require('./EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs');
|
|
18
16
|
var EmailVerification = require('./EmailVerification/EmailVerification.cjs');
|
|
19
17
|
var EmailWalletOTPVerificationView = require('./EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs');
|
|
@@ -156,7 +154,6 @@ const viewToComponentMap = {
|
|
|
156
154
|
'chainalysis-blocked-wallet': NoAccess.NoAccess,
|
|
157
155
|
'collect-user-data': CollectUserDataView.CollectUserDataView,
|
|
158
156
|
'collect-user-data-login-no-wallet': CollectUserDataViewNoWallet.CollectUserDataViewNoWallet,
|
|
159
|
-
'create-password-view': CreatePasswordView.CreatePasswordView,
|
|
160
157
|
'email-wallet-otp-verification-view': EmailWalletOTPVerificationView.EmailWalletOTPVerificationView,
|
|
161
158
|
'embedded-delete-view': EmbeddedDeleteView.EmbeddedDeleteView,
|
|
162
159
|
'embedded-reveal-account-view': EmbeddedRevealView.EmbeddedRevealView,
|
|
@@ -209,7 +206,6 @@ const viewToComponentMap = {
|
|
|
209
206
|
'verify-sms': SmsVerification.SmsVerification,
|
|
210
207
|
'wait-for-email-confirmation-view': EmailConfirmationWaitingView.EmailConfirmationWaitingView,
|
|
211
208
|
'wallet-cannot-be-transferred': WalletCannotBeTransferredView.WalletCannotBeTransferredView,
|
|
212
|
-
'wallet-claim-intro': CoinbaseMPCClaimIntro.CoinbaseMPCClaimIntro,
|
|
213
209
|
'wallet-connect-mobile-wallets-list': () => (jsxRuntime.jsx(WalletListForDefaultConnection.WalletListForDefaultConnection, { isWalletConnectList: true })),
|
|
214
210
|
'wallet-group': WalletGroupView.WalletGroupView,
|
|
215
211
|
'wallet-list': WalletListForDefaultConnection.WalletListForDefaultConnection,
|
|
@@ -12,7 +12,6 @@ export declare const viewToComponentMap: {
|
|
|
12
12
|
userIdentification: keyof import("@dynamic-labs/sdk-api-core").UserFields | "environmentId" | "lastVerifiedCredentialId" | "lists" | "newUser" | "sessionId" | "userId" | "verifiedCredentials" | "scope" | "missingFields";
|
|
13
13
|
userIdentificationOverride?: string | undefined;
|
|
14
14
|
}>;
|
|
15
|
-
'create-password-view': import("react").FC<import("./CreatePasswordView/CreatePasswordView").CreatePasswordViewProps>;
|
|
16
15
|
'email-wallet-otp-verification-view': () => JSX.Element;
|
|
17
16
|
'embedded-delete-view': () => JSX.Element;
|
|
18
17
|
'embedded-reveal-account-view': import("react").FC<import("./EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView").EmbeddedRevealViewProps>;
|
|
@@ -83,7 +82,6 @@ export declare const viewToComponentMap: {
|
|
|
83
82
|
'verify-sms': import("react").FC;
|
|
84
83
|
'wait-for-email-confirmation-view': () => JSX.Element;
|
|
85
84
|
'wallet-cannot-be-transferred': () => JSX.Element;
|
|
86
|
-
'wallet-claim-intro': () => JSX.Element;
|
|
87
85
|
'wallet-connect-mobile-wallets-list': () => JSX.Element;
|
|
88
86
|
'wallet-group': import("react").FC<{
|
|
89
87
|
onSelectWallet: (wallet: import("../shared").WalletOption) => void;
|
|
@@ -6,10 +6,8 @@ import { BridgeNextWalletConnectionView } from './BridgeNextWalletConnectionView
|
|
|
6
6
|
import { BridgeSummaryView } from './BridgeSummaryView/BridgeSummaryView.js';
|
|
7
7
|
import { BridgeWelcomeView } from './BridgeWelcomeView/BridgeWelcomeView.js';
|
|
8
8
|
import { CaptchaVerifyUser } from './CaptchaVerifyUser/CaptchaVerifyUser.js';
|
|
9
|
-
import { CoinbaseMPCClaimIntro } from './CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.js';
|
|
10
9
|
import { CollectUserDataView } from './CollectUserDataView/CollectUserDataView.js';
|
|
11
10
|
import { CollectUserDataViewNoWallet } from './CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.js';
|
|
12
|
-
import { CreatePasswordView } from './CreatePasswordView/CreatePasswordView.js';
|
|
13
11
|
import { EmailConfirmationWaitingView } from './EmailConfirmationWaitingView/EmailConfirmationWaitingView.js';
|
|
14
12
|
import { EmailVerification } from './EmailVerification/EmailVerification.js';
|
|
15
13
|
import { EmailWalletOTPVerificationView } from './EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js';
|
|
@@ -152,7 +150,6 @@ const viewToComponentMap = {
|
|
|
152
150
|
'chainalysis-blocked-wallet': NoAccess,
|
|
153
151
|
'collect-user-data': CollectUserDataView,
|
|
154
152
|
'collect-user-data-login-no-wallet': CollectUserDataViewNoWallet,
|
|
155
|
-
'create-password-view': CreatePasswordView,
|
|
156
153
|
'email-wallet-otp-verification-view': EmailWalletOTPVerificationView,
|
|
157
154
|
'embedded-delete-view': EmbeddedDeleteView,
|
|
158
155
|
'embedded-reveal-account-view': EmbeddedRevealView,
|
|
@@ -205,7 +202,6 @@ const viewToComponentMap = {
|
|
|
205
202
|
'verify-sms': SmsVerification,
|
|
206
203
|
'wait-for-email-confirmation-view': EmailConfirmationWaitingView,
|
|
207
204
|
'wallet-cannot-be-transferred': WalletCannotBeTransferredView,
|
|
208
|
-
'wallet-claim-intro': CoinbaseMPCClaimIntro,
|
|
209
205
|
'wallet-connect-mobile-wallets-list': () => (jsx(WalletListForDefaultConnection, { isWalletConnectList: true })),
|
|
210
206
|
'wallet-group': WalletGroupView,
|
|
211
207
|
'wallet-list': WalletListForDefaultConnection,
|