@dynamic-labs/sdk-react-core 4.5.0 → 4.5.1
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 +7 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -11
- 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/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 +4 -7
- package/src/lib/locale/en/translation.d.ts +3 -6
- package/src/lib/locale/en/translation.js +4 -7
- 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/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/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/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/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 +5 -7
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +5 -7
- 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/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 +9 -5
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/ReceiveExternalWalletFunds.js +9 -5
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/formatValue.cjs +6 -0
- package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/formatValue.js +6 -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/SettingsView/SettingsView.cjs +7 -17
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +8 -18
- 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/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
|
@@ -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,
|
package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs
CHANGED
|
@@ -64,7 +64,6 @@ require('../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs')
|
|
|
64
64
|
require('@dynamic-labs/rpc-providers');
|
|
65
65
|
require('../../../../store/state/loadingAndLifecycle.cjs');
|
|
66
66
|
require('../../../../store/state/walletOptions/walletOptions.cjs');
|
|
67
|
-
var helpers = require('../../helpers/helpers.cjs');
|
|
68
67
|
var Typography = require('../../../../components/Typography/Typography.cjs');
|
|
69
68
|
require('../../../../context/FooterAnimationContext/index.cjs');
|
|
70
69
|
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
@@ -77,6 +76,7 @@ require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
|
77
76
|
require('../DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
78
77
|
require('react-focus-lock');
|
|
79
78
|
var AuthProviderIcon = require('../../../../components/AuthProviderIcon/AuthProviderIcon.cjs');
|
|
79
|
+
var helpers = require('../../helpers/helpers.cjs');
|
|
80
80
|
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
81
81
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
82
82
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
@@ -117,7 +117,7 @@ var TokenBalanceList = require('./TokenBalanceList/TokenBalanceList.cjs');
|
|
|
117
117
|
const ICON_SIZE = 28;
|
|
118
118
|
const DROPDOWN_ICON_SIZE = 16;
|
|
119
119
|
const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
120
|
-
var _a, _b, _c, _d
|
|
120
|
+
var _a, _b, _c, _d;
|
|
121
121
|
const { t } = reactI18next.useTranslation();
|
|
122
122
|
const [isNetworkPickerOpen, setIsNetworkPickerOpen] = React.useState(false);
|
|
123
123
|
const [balanceIsExpanded, setBalanceIsExpanded] = React.useState(false);
|
|
@@ -142,9 +142,7 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
142
142
|
const { showAlert } = PasskeyContext.usePasskeyContext();
|
|
143
143
|
const wallet = (_a = (primaryWallet && getEOAWallet(primaryWallet))) !== null && _a !== void 0 ? _a : primaryWallet;
|
|
144
144
|
const isBitcoin = primaryWallet && walletConnectorCore.isBitcoinConnector(primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector);
|
|
145
|
-
const isEmbeddedWallet = Boolean(wallet &&
|
|
146
|
-
(((_c = (_b = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _b === void 0 ? void 0 : _b.key) === null || _c === void 0 ? void 0 : _c.startsWith('turnkey')) ||
|
|
147
|
-
((_e = (_d = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _d === void 0 ? void 0 : _d.key) === null || _e === void 0 ? void 0 : _e.startsWith('coinbasempc'))));
|
|
145
|
+
const isEmbeddedWallet = Boolean(wallet && ((_c = (_b = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _b === void 0 ? void 0 : _b.key) === null || _c === void 0 ? void 0 : _c.startsWith('turnkey')));
|
|
148
146
|
const options = [
|
|
149
147
|
{
|
|
150
148
|
Icon: jsxRuntime.jsx(copy.ReactComponent, { width: DROPDOWN_ICON_SIZE, height: DROPDOWN_ICON_SIZE }),
|
|
@@ -190,7 +188,7 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
190
188
|
};
|
|
191
189
|
const enableMultiAsset = (authMode === 'connect-and-sign' ||
|
|
192
190
|
(authMode === 'connect-only' &&
|
|
193
|
-
((
|
|
191
|
+
((_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.featureFlags) === null || _d === void 0 ? void 0 : _d.connectOnlyMultiAsset))) &&
|
|
194
192
|
multiAsset;
|
|
195
193
|
const isNetworkMultiAssetSupported = isMultiAssetSupportedNetwork.isMultiAssetSupportedNetwork(primaryConnector, network);
|
|
196
194
|
const isTooManyRequests = errorTokenBalances === 'Too many requests fetching balances';
|
|
@@ -220,7 +218,7 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
220
218
|
}
|
|
221
219
|
return (jsxRuntime.jsxs("div", { className: 'active-wallet-information-container', "data-testid": 'active-wallet-information', children: [jsxRuntime.jsxs("div", { className: 'active-wallet-information', children: [jsxRuntime.jsxs("div", { className: 'active-wallet-information__header', children: [jsxRuntime.jsx("div", { className: 'active-wallet-information__avatar', children: (nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsxRuntime.jsx("div", { className: 'active-wallet-information__avatar__name-service', children: jsxRuntime.jsx("img", { src: nameService === null || nameService === void 0 ? void 0 : nameService.avatar, alt: '' }) })) : (jsxRuntime.jsx("div", { className: 'active-wallet-information__wallet-img', children: jsxRuntime.jsx(AuthProviderIcon.AuthProviderIcon, { iconSize: ICON_SIZE }) })) }), jsxRuntime.jsxs("div", { className: 'active-wallet-information__details', children: [jsxRuntime.jsx("div", { className: classNames.classNames('active-wallet-information__addresses-container', {
|
|
222
220
|
'active-wallet-information__addresses-container--centered': !(nameService === null || nameService === void 0 ? void 0 : nameService.name),
|
|
223
|
-
}), children: activeWalletAddress() }), address && (jsxRuntime.jsx(WalletDetailsCard.WalletDetailsCard, { open: detailsCardOpen, address: address, onClose: () => setDetailsCardOpen(false) })), !shouldHideNetwork && (jsxRuntime.jsx(NetworkPicker.NetworkPicker, { currentNetwork: network, connector: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, mainClassName: 'active-wallet-information__network-picker', buttonClassName: 'active-wallet-information__network-picker-button', evmNetworks: evmNetworks, showNetworkName: true, isLoading: isLoading }))] })] }), headerAlert && (jsxRuntime.jsx(Alert.Alert, { variant: headerAlert.variant,
|
|
221
|
+
}), children: activeWalletAddress() }), address && (jsxRuntime.jsx(WalletDetailsCard.WalletDetailsCard, { open: detailsCardOpen, address: address, onClose: () => setDetailsCardOpen(false) })), !shouldHideNetwork && (jsxRuntime.jsx(NetworkPicker.NetworkPicker, { currentNetwork: network, connector: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, mainClassName: 'active-wallet-information__network-picker', buttonClassName: 'active-wallet-information__network-picker-button', evmNetworks: evmNetworks, showNetworkName: true, isLoading: isLoading }))] })] }), headerAlert && (jsxRuntime.jsx(Alert.Alert, { variant: headerAlert.variant, children: headerAlert.content })), showTestnetAlert && (jsxRuntime.jsx(Alert.Alert, { variant: 'warning', copykey: 'dyn_active_wallet_info.testnet_warning', children: t('dyn_active_wallet_info.testnet_warning') }))] }), showMultiAsset ? (jsxRuntime.jsx("div", { className: 'multi-asset-balance-container', children: multiAssetHeader() })) : (jsxRuntime.jsxs("div", { className: 'balance-container', children: [jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', children: t('dyn_active_wallet_info.balance') }), primaryWalletNativeBalance()] }))] }));
|
|
224
222
|
};
|
|
225
223
|
|
|
226
224
|
exports.ActiveWalletInformation = ActiveWalletInformation;
|
package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js
CHANGED
|
@@ -60,7 +60,6 @@ import '../../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
|
60
60
|
import '@dynamic-labs/rpc-providers';
|
|
61
61
|
import '../../../../store/state/loadingAndLifecycle.js';
|
|
62
62
|
import '../../../../store/state/walletOptions/walletOptions.js';
|
|
63
|
-
import { getExportKeysOption } from '../../helpers/helpers.js';
|
|
64
63
|
import { Typography } from '../../../../components/Typography/Typography.js';
|
|
65
64
|
import '../../../../context/FooterAnimationContext/index.js';
|
|
66
65
|
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
@@ -73,6 +72,7 @@ import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
|
73
72
|
import '../DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
74
73
|
import 'react-focus-lock';
|
|
75
74
|
import { AuthProviderIcon } from '../../../../components/AuthProviderIcon/AuthProviderIcon.js';
|
|
75
|
+
import { getExportKeysOption } from '../../helpers/helpers.js';
|
|
76
76
|
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
77
77
|
import '../../../../components/IconButton/IconButton.js';
|
|
78
78
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
@@ -113,7 +113,7 @@ import { TokenBalanceList } from './TokenBalanceList/TokenBalanceList.js';
|
|
|
113
113
|
const ICON_SIZE = 28;
|
|
114
114
|
const DROPDOWN_ICON_SIZE = 16;
|
|
115
115
|
const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
116
|
-
var _a, _b, _c, _d
|
|
116
|
+
var _a, _b, _c, _d;
|
|
117
117
|
const { t } = useTranslation();
|
|
118
118
|
const [isNetworkPickerOpen, setIsNetworkPickerOpen] = useState(false);
|
|
119
119
|
const [balanceIsExpanded, setBalanceIsExpanded] = useState(false);
|
|
@@ -138,9 +138,7 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
138
138
|
const { showAlert } = usePasskeyContext();
|
|
139
139
|
const wallet = (_a = (primaryWallet && getEOAWallet(primaryWallet))) !== null && _a !== void 0 ? _a : primaryWallet;
|
|
140
140
|
const isBitcoin = primaryWallet && isBitcoinConnector(primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector);
|
|
141
|
-
const isEmbeddedWallet = Boolean(wallet &&
|
|
142
|
-
(((_c = (_b = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _b === void 0 ? void 0 : _b.key) === null || _c === void 0 ? void 0 : _c.startsWith('turnkey')) ||
|
|
143
|
-
((_e = (_d = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _d === void 0 ? void 0 : _d.key) === null || _e === void 0 ? void 0 : _e.startsWith('coinbasempc'))));
|
|
141
|
+
const isEmbeddedWallet = Boolean(wallet && ((_c = (_b = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _b === void 0 ? void 0 : _b.key) === null || _c === void 0 ? void 0 : _c.startsWith('turnkey')));
|
|
144
142
|
const options = [
|
|
145
143
|
{
|
|
146
144
|
Icon: jsx(SvgCopy, { width: DROPDOWN_ICON_SIZE, height: DROPDOWN_ICON_SIZE }),
|
|
@@ -186,7 +184,7 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
186
184
|
};
|
|
187
185
|
const enableMultiAsset = (authMode === 'connect-and-sign' ||
|
|
188
186
|
(authMode === 'connect-only' &&
|
|
189
|
-
((
|
|
187
|
+
((_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.featureFlags) === null || _d === void 0 ? void 0 : _d.connectOnlyMultiAsset))) &&
|
|
190
188
|
multiAsset;
|
|
191
189
|
const isNetworkMultiAssetSupported = isMultiAssetSupportedNetwork(primaryConnector, network);
|
|
192
190
|
const isTooManyRequests = errorTokenBalances === 'Too many requests fetching balances';
|
|
@@ -216,7 +214,7 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
216
214
|
}
|
|
217
215
|
return (jsxs("div", { className: 'active-wallet-information-container', "data-testid": 'active-wallet-information', children: [jsxs("div", { className: 'active-wallet-information', children: [jsxs("div", { className: 'active-wallet-information__header', children: [jsx("div", { className: 'active-wallet-information__avatar', children: (nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsx("div", { className: 'active-wallet-information__avatar__name-service', children: jsx("img", { src: nameService === null || nameService === void 0 ? void 0 : nameService.avatar, alt: '' }) })) : (jsx("div", { className: 'active-wallet-information__wallet-img', children: jsx(AuthProviderIcon, { iconSize: ICON_SIZE }) })) }), jsxs("div", { className: 'active-wallet-information__details', children: [jsx("div", { className: classNames('active-wallet-information__addresses-container', {
|
|
218
216
|
'active-wallet-information__addresses-container--centered': !(nameService === null || nameService === void 0 ? void 0 : nameService.name),
|
|
219
|
-
}), children: activeWalletAddress() }), address && (jsx(WalletDetailsCard, { open: detailsCardOpen, address: address, onClose: () => setDetailsCardOpen(false) })), !shouldHideNetwork && (jsx(NetworkPicker, { currentNetwork: network, connector: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, mainClassName: 'active-wallet-information__network-picker', buttonClassName: 'active-wallet-information__network-picker-button', evmNetworks: evmNetworks, showNetworkName: true, isLoading: isLoading }))] })] }), headerAlert && (jsx(Alert, { variant: headerAlert.variant,
|
|
217
|
+
}), children: activeWalletAddress() }), address && (jsx(WalletDetailsCard, { open: detailsCardOpen, address: address, onClose: () => setDetailsCardOpen(false) })), !shouldHideNetwork && (jsx(NetworkPicker, { currentNetwork: network, connector: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, mainClassName: 'active-wallet-information__network-picker', buttonClassName: 'active-wallet-information__network-picker-button', evmNetworks: evmNetworks, showNetworkName: true, isLoading: isLoading }))] })] }), headerAlert && (jsx(Alert, { variant: headerAlert.variant, children: headerAlert.content })), showTestnetAlert && (jsx(Alert, { variant: 'warning', copykey: 'dyn_active_wallet_info.testnet_warning', children: t('dyn_active_wallet_info.testnet_warning') }))] }), showMultiAsset ? (jsx("div", { className: 'multi-asset-balance-container', children: multiAssetHeader() })) : (jsxs("div", { className: 'balance-container', children: [jsx(Typography, { color: 'secondary', variant: 'body_small', children: t('dyn_active_wallet_info.balance') }), primaryWalletNativeBalance()] }))] }));
|
|
220
218
|
};
|
|
221
219
|
|
|
222
220
|
export { ActiveWalletInformation };
|
|
@@ -54,7 +54,6 @@ require('@dynamic-labs/rpc-providers');
|
|
|
54
54
|
require('../../../../store/state/loadingAndLifecycle.cjs');
|
|
55
55
|
require('../../../../store/state/walletOptions/walletOptions.cjs');
|
|
56
56
|
require('react-i18next');
|
|
57
|
-
var helpers = require('../../helpers/helpers.cjs');
|
|
58
57
|
var Typography = require('../../../../components/Typography/Typography.cjs');
|
|
59
58
|
require('../../../../context/FooterAnimationContext/index.cjs');
|
|
60
59
|
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
@@ -68,6 +67,7 @@ require('../DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
|
68
67
|
require('react-focus-lock');
|
|
69
68
|
var useFetchBalance = require('../../hooks/useFetchBalance/useFetchBalance.cjs');
|
|
70
69
|
var useFetchCurrency = require('../../hooks/useFetchCurrency/useFetchCurrency.cjs');
|
|
70
|
+
var helpers = require('../../helpers/helpers.cjs');
|
|
71
71
|
require('../../context/DynamicWidgetContext.cjs');
|
|
72
72
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
73
73
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
@@ -50,7 +50,6 @@ import '@dynamic-labs/rpc-providers';
|
|
|
50
50
|
import '../../../../store/state/loadingAndLifecycle.js';
|
|
51
51
|
import '../../../../store/state/walletOptions/walletOptions.js';
|
|
52
52
|
import 'react-i18next';
|
|
53
|
-
import { roundBalance } from '../../helpers/helpers.js';
|
|
54
53
|
import { Typography } from '../../../../components/Typography/Typography.js';
|
|
55
54
|
import '../../../../context/FooterAnimationContext/index.js';
|
|
56
55
|
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
@@ -64,6 +63,7 @@ import '../DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
|
64
63
|
import 'react-focus-lock';
|
|
65
64
|
import { useFetchBalance } from '../../hooks/useFetchBalance/useFetchBalance.js';
|
|
66
65
|
import { useFetchCurrency } from '../../hooks/useFetchCurrency/useFetchCurrency.js';
|
|
66
|
+
import { roundBalance } from '../../helpers/helpers.js';
|
|
67
67
|
import '../../context/DynamicWidgetContext.js';
|
|
68
68
|
import '../../../../components/IconButton/IconButton.js';
|
|
69
69
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
@@ -28,13 +28,13 @@ require('react-international-phone');
|
|
|
28
28
|
var shortenEmail = require('../../../../shared/utils/functions/shortenEmail/shortenEmail.cjs');
|
|
29
29
|
require('../../../../store/state/nonce/nonce.cjs');
|
|
30
30
|
require('../../../../store/state/projectSettings/projectSettings.cjs');
|
|
31
|
-
require('../../../../config/ApiEndpoint.cjs');
|
|
32
|
-
require('../../../../store/state/user/user.cjs');
|
|
33
|
-
require('../../../../locale/locale.cjs');
|
|
34
31
|
var updatePrimaryWalletId = require('../../../../utils/functions/updatePrimaryWalletId/updatePrimaryWalletId.cjs');
|
|
35
32
|
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
36
33
|
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
37
34
|
require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
35
|
+
require('../../../../config/ApiEndpoint.cjs');
|
|
36
|
+
require('../../../../store/state/user/user.cjs');
|
|
37
|
+
require('../../../../locale/locale.cjs');
|
|
38
38
|
require('../../../../context/VerificationContext/VerificationContext.cjs');
|
|
39
39
|
require('react-dom');
|
|
40
40
|
require('../../../../utils/functions/compareChains/compareChains.cjs');
|
|
@@ -24,13 +24,13 @@ import 'react-international-phone';
|
|
|
24
24
|
import { shortenEmail } from '../../../../shared/utils/functions/shortenEmail/shortenEmail.js';
|
|
25
25
|
import '../../../../store/state/nonce/nonce.js';
|
|
26
26
|
import '../../../../store/state/projectSettings/projectSettings.js';
|
|
27
|
-
import '../../../../config/ApiEndpoint.js';
|
|
28
|
-
import '../../../../store/state/user/user.js';
|
|
29
|
-
import '../../../../locale/locale.js';
|
|
30
27
|
import { updatePrimaryWalletId } from '../../../../utils/functions/updatePrimaryWalletId/updatePrimaryWalletId.js';
|
|
31
28
|
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
32
29
|
import '../../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
33
30
|
import '../../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
31
|
+
import '../../../../config/ApiEndpoint.js';
|
|
32
|
+
import '../../../../store/state/user/user.js';
|
|
33
|
+
import '../../../../locale/locale.js';
|
|
34
34
|
import '../../../../context/VerificationContext/VerificationContext.js';
|
|
35
35
|
import 'react-dom';
|
|
36
36
|
import '../../../../utils/functions/compareChains/compareChains.js';
|
package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs
CHANGED
|
@@ -56,7 +56,6 @@ require('@dynamic-labs/rpc-providers');
|
|
|
56
56
|
require('../../../../store/state/loadingAndLifecycle.cjs');
|
|
57
57
|
require('../../../../store/state/walletOptions/walletOptions.cjs');
|
|
58
58
|
require('react-i18next');
|
|
59
|
-
var helpers = require('../../helpers/helpers.cjs');
|
|
60
59
|
require('../../../../context/FooterAnimationContext/index.cjs');
|
|
61
60
|
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
62
61
|
require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
@@ -66,6 +65,7 @@ require('../../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTar
|
|
|
66
65
|
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
67
66
|
require('../DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
68
67
|
require('react-focus-lock');
|
|
68
|
+
var helpers = require('../../helpers/helpers.cjs');
|
|
69
69
|
require('../../context/DynamicWidgetContext.cjs');
|
|
70
70
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
71
71
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
@@ -52,7 +52,6 @@ import '@dynamic-labs/rpc-providers';
|
|
|
52
52
|
import '../../../../store/state/loadingAndLifecycle.js';
|
|
53
53
|
import '../../../../store/state/walletOptions/walletOptions.js';
|
|
54
54
|
import 'react-i18next';
|
|
55
|
-
import { copyToClipboard } from '../../helpers/helpers.js';
|
|
56
55
|
import '../../../../context/FooterAnimationContext/index.js';
|
|
57
56
|
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
58
57
|
import '../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
@@ -62,6 +61,7 @@ import '../../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarg
|
|
|
62
61
|
import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
63
62
|
import '../DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
64
63
|
import 'react-focus-lock';
|
|
64
|
+
import { copyToClipboard } from '../../helpers/helpers.js';
|
|
65
65
|
import '../../context/DynamicWidgetContext.js';
|
|
66
66
|
import '../../../../components/IconButton/IconButton.js';
|
|
67
67
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
@@ -113,7 +113,7 @@ const DynamicWidgetContextProvider = ({ children, }) => {
|
|
|
113
113
|
}, []);
|
|
114
114
|
const setHeaderAlert = React.useCallback((alert) => {
|
|
115
115
|
var _a;
|
|
116
|
-
const timeout = (_a = alert === null || alert === void 0 ? void 0 : alert.timeout) !== null && _a !== void 0 ? _a :
|
|
116
|
+
const timeout = (_a = alert === null || alert === void 0 ? void 0 : alert.timeout) !== null && _a !== void 0 ? _a : 10000;
|
|
117
117
|
_setHeaderAlert(alert);
|
|
118
118
|
headerAlertTimeoutRef.current = setTimeout(clearHeaderAlert, timeout);
|
|
119
119
|
}, [clearHeaderAlert]);
|
|
@@ -109,7 +109,7 @@ const DynamicWidgetContextProvider = ({ children, }) => {
|
|
|
109
109
|
}, []);
|
|
110
110
|
const setHeaderAlert = useCallback((alert) => {
|
|
111
111
|
var _a;
|
|
112
|
-
const timeout = (_a = alert === null || alert === void 0 ? void 0 : alert.timeout) !== null && _a !== void 0 ? _a :
|
|
112
|
+
const timeout = (_a = alert === null || alert === void 0 ? void 0 : alert.timeout) !== null && _a !== void 0 ? _a : 10000;
|
|
113
113
|
_setHeaderAlert(alert);
|
|
114
114
|
headerAlertTimeoutRef.current = setTimeout(clearHeaderAlert, timeout);
|
|
115
115
|
}, [clearHeaderAlert]);
|
package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs
CHANGED
|
@@ -56,7 +56,6 @@ require('@dynamic-labs/rpc-providers');
|
|
|
56
56
|
require('../../../../store/state/loadingAndLifecycle.cjs');
|
|
57
57
|
require('../../../../store/state/walletOptions/walletOptions.cjs');
|
|
58
58
|
require('react-i18next');
|
|
59
|
-
var helpers = require('../../helpers/helpers.cjs');
|
|
60
59
|
var Typography = require('../../../../components/Typography/Typography.cjs');
|
|
61
60
|
require('../../../../context/FooterAnimationContext/index.cjs');
|
|
62
61
|
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
@@ -71,6 +70,7 @@ var WidgetPortal = require('../../components/WidgetPortal/WidgetPortal.cjs');
|
|
|
71
70
|
var useCloseMultiWalletPrompt = require('../../hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.cjs');
|
|
72
71
|
var DefaultPromptModal = require('../DefaultPromptModal/DefaultPromptModal.cjs');
|
|
73
72
|
var AuthProviderIcon = require('../../../../components/AuthProviderIcon/AuthProviderIcon.cjs');
|
|
73
|
+
var helpers = require('../../helpers/helpers.cjs');
|
|
74
74
|
require('../../context/DynamicWidgetContext.cjs');
|
|
75
75
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
76
76
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js
CHANGED
|
@@ -52,7 +52,6 @@ import '@dynamic-labs/rpc-providers';
|
|
|
52
52
|
import '../../../../store/state/loadingAndLifecycle.js';
|
|
53
53
|
import '../../../../store/state/walletOptions/walletOptions.js';
|
|
54
54
|
import 'react-i18next';
|
|
55
|
-
import { capitalize } from '../../helpers/helpers.js';
|
|
56
55
|
import { Typography } from '../../../../components/Typography/Typography.js';
|
|
57
56
|
import '../../../../context/FooterAnimationContext/index.js';
|
|
58
57
|
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
@@ -67,6 +66,7 @@ import { WidgetPortal } from '../../components/WidgetPortal/WidgetPortal.js';
|
|
|
67
66
|
import { useCloseMultiWalletPrompt } from '../../hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.js';
|
|
68
67
|
import { DefaultPromptLayout } from '../DefaultPromptModal/DefaultPromptModal.js';
|
|
69
68
|
import { AuthProviderIcon } from '../../../../components/AuthProviderIcon/AuthProviderIcon.js';
|
|
69
|
+
import { capitalize } from '../../helpers/helpers.js';
|
|
70
70
|
import '../../context/DynamicWidgetContext.js';
|
|
71
71
|
import '../../../../components/IconButton/IconButton.js';
|
|
72
72
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
package/src/lib/widgets/DynamicWidget/views/ChooseOnrampProviderView/ChooseOnrampProviderView.cjs
CHANGED
|
@@ -27,6 +27,7 @@ require('@dynamic-labs/wallet-book');
|
|
|
27
27
|
require('../../../../utils/constants/colors.cjs');
|
|
28
28
|
require('../../../../utils/constants/values.cjs');
|
|
29
29
|
require('../../../../shared/consts/index.cjs');
|
|
30
|
+
var useInternalDynamicContext = require('../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.cjs');
|
|
30
31
|
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
31
32
|
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
32
33
|
require('@dynamic-labs/multi-wallet');
|
|
@@ -100,9 +101,11 @@ const ChooseOnrampProviderView = () => {
|
|
|
100
101
|
const { t } = reactI18next.useTranslation();
|
|
101
102
|
const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
|
|
102
103
|
const { enabledOnrampProviders } = OnrampContext.useOnrampContext();
|
|
104
|
+
const { primaryWallet } = useInternalDynamicContext.useInternalDynamicContext();
|
|
103
105
|
const onrampOptions = React.useMemo(() => enabledOnrampProviders.filter(({ isPaymentMethod }) => !isPaymentMethod), [enabledOnrampProviders]);
|
|
104
106
|
const backButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', id: 'back-button', "data-testid": 'back-button', onClick: () => setDynamicWidgetView('choose-wallet-funding-method'), children: jsxRuntime.jsx(arrowLeft.ReactComponent, {}) }));
|
|
105
|
-
return (jsxRuntime.jsxs("div", { className: 'deposit-view', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, description: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', className: 'choose-onramp-provider__header-description', children: t('dyn_wallet_funding.onramp_provider_selection.description') }), children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', children: t('dyn_wallet_funding.onramp_provider_selection.title') }) }), jsxRuntime.jsx("div", { className: 'choose-wallet-funding-method__options', children:
|
|
107
|
+
return (jsxRuntime.jsxs("div", { className: 'deposit-view', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, description: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', className: 'choose-onramp-provider__header-description', children: t('dyn_wallet_funding.onramp_provider_selection.description') }), children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', children: t('dyn_wallet_funding.onramp_provider_selection.title') }) }), jsxRuntime.jsx("div", { className: 'choose-wallet-funding-method__options', children: primaryWallet &&
|
|
108
|
+
onrampOptions.map((option) => (jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: () => option.onClick({ wallet: primaryWallet }), leading: jsxRuntime.jsx(Icon.Icon, { className: 'choose-onramp-provider__options__option__icon', children: jsxRuntime.jsx("img", { src: option.iconUrl, alt: option.displayName }) }), typographyProps: { variant: 'body_normal', weight: 'medium' }, buttonVariant: 'card', className: 'choose-wallet-funding-method__options__option', description: option.description, children: option.displayName }, option.id))) })] }));
|
|
106
109
|
};
|
|
107
110
|
|
|
108
111
|
exports.ChooseOnrampProviderView = ChooseOnrampProviderView;
|
package/src/lib/widgets/DynamicWidget/views/ChooseOnrampProviderView/ChooseOnrampProviderView.js
CHANGED
|
@@ -23,6 +23,7 @@ import '@dynamic-labs/wallet-book';
|
|
|
23
23
|
import '../../../../utils/constants/colors.js';
|
|
24
24
|
import '../../../../utils/constants/values.js';
|
|
25
25
|
import '../../../../shared/consts/index.js';
|
|
26
|
+
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.js';
|
|
26
27
|
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
27
28
|
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
28
29
|
import '@dynamic-labs/multi-wallet';
|
|
@@ -96,9 +97,11 @@ const ChooseOnrampProviderView = () => {
|
|
|
96
97
|
const { t } = useTranslation();
|
|
97
98
|
const { setDynamicWidgetView } = useWidgetContext();
|
|
98
99
|
const { enabledOnrampProviders } = useOnrampContext();
|
|
100
|
+
const { primaryWallet } = useInternalDynamicContext();
|
|
99
101
|
const onrampOptions = useMemo(() => enabledOnrampProviders.filter(({ isPaymentMethod }) => !isPaymentMethod), [enabledOnrampProviders]);
|
|
100
102
|
const backButton = (jsx(IconButton, { type: 'button', id: 'back-button', "data-testid": 'back-button', onClick: () => setDynamicWidgetView('choose-wallet-funding-method'), children: jsx(SvgArrowLeft, {}) }));
|
|
101
|
-
return (jsxs("div", { className: 'deposit-view', children: [jsx(ModalHeader, { leading: backButton, description: jsx(Typography, { variant: 'body_small', color: 'secondary', className: 'choose-onramp-provider__header-description', children: t('dyn_wallet_funding.onramp_provider_selection.description') }), children: jsx(Typography, { variant: 'title', children: t('dyn_wallet_funding.onramp_provider_selection.title') }) }), jsx("div", { className: 'choose-wallet-funding-method__options', children:
|
|
103
|
+
return (jsxs("div", { className: 'deposit-view', children: [jsx(ModalHeader, { leading: backButton, description: jsx(Typography, { variant: 'body_small', color: 'secondary', className: 'choose-onramp-provider__header-description', children: t('dyn_wallet_funding.onramp_provider_selection.description') }), children: jsx(Typography, { variant: 'title', children: t('dyn_wallet_funding.onramp_provider_selection.title') }) }), jsx("div", { className: 'choose-wallet-funding-method__options', children: primaryWallet &&
|
|
104
|
+
onrampOptions.map((option) => (jsx(TypographyButton, { onClick: () => option.onClick({ wallet: primaryWallet }), leading: jsx(Icon, { className: 'choose-onramp-provider__options__option__icon', children: jsx("img", { src: option.iconUrl, alt: option.displayName }) }), typographyProps: { variant: 'body_normal', weight: 'medium' }, buttonVariant: 'card', className: 'choose-wallet-funding-method__options__option', description: option.description, children: option.displayName }, option.id))) })] }));
|
|
102
105
|
};
|
|
103
106
|
|
|
104
107
|
export { ChooseOnrampProviderView };
|
package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/ChooseWalletFundingMethod.cjs
CHANGED
|
@@ -23,7 +23,7 @@ const ChooseWalletFundingMethod = () => {
|
|
|
23
23
|
const { t } = reactI18next.useTranslation();
|
|
24
24
|
const backButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', id: 'back-button', "data-testid": 'back-button', onClick: goToInitialDynamicWidgetView, children: jsxRuntime.jsx(arrowLeft.ReactComponent, {}) }));
|
|
25
25
|
const methods = useFundingMethods.useFundingMethods();
|
|
26
|
-
return (jsxRuntime.jsxs("div", { className: 'choose-wallet-funding-method', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton,
|
|
26
|
+
return (jsxRuntime.jsxs("div", { className: 'choose-wallet-funding-method', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', children: t('dyn_wallet_funding.funding_method_selection.title') }) }), jsxRuntime.jsx("div", { className: 'choose-wallet-funding-method__options', children: methods.map((method) => {
|
|
27
27
|
var _a;
|
|
28
28
|
return (jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: method.onClick, description: method.description, leading: jsxRuntime.jsx(Icon.Icon, { color: 'text-tertiary', className: 'choose-wallet-funding-method__options__option__icon', children: method.icon }), trailing: jsxRuntime.jsx(MakeTrailing.MakeTrailing, { previewIcons: (_a = method.previewIcons) !== null && _a !== void 0 ? _a : [], showChevron: Boolean(method.showChevron) }), typographyProps: { variant: 'body_normal', weight: 'medium' }, buttonVariant: 'card', className: 'choose-wallet-funding-method__options__option', children: method.label }, method.key));
|
|
29
29
|
}) })] }));
|
package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/ChooseWalletFundingMethod.js
CHANGED
|
@@ -19,7 +19,7 @@ const ChooseWalletFundingMethod = () => {
|
|
|
19
19
|
const { t } = useTranslation();
|
|
20
20
|
const backButton = (jsx(IconButton, { type: 'button', id: 'back-button', "data-testid": 'back-button', onClick: goToInitialDynamicWidgetView, children: jsx(SvgArrowLeft, {}) }));
|
|
21
21
|
const methods = useFundingMethods();
|
|
22
|
-
return (jsxs("div", { className: 'choose-wallet-funding-method', children: [jsx(ModalHeader, { leading: backButton,
|
|
22
|
+
return (jsxs("div", { className: 'choose-wallet-funding-method', children: [jsx(ModalHeader, { leading: backButton, children: jsx(Typography, { variant: 'title', children: t('dyn_wallet_funding.funding_method_selection.title') }) }), jsx("div", { className: 'choose-wallet-funding-method__options', children: methods.map((method) => {
|
|
23
23
|
var _a;
|
|
24
24
|
return (jsx(TypographyButton, { onClick: method.onClick, description: method.description, leading: jsx(Icon, { color: 'text-tertiary', className: 'choose-wallet-funding-method__options__option__icon', children: method.icon }), trailing: jsx(MakeTrailing, { previewIcons: (_a = method.previewIcons) !== null && _a !== void 0 ? _a : [], showChevron: Boolean(method.showChevron) }), typographyProps: { variant: 'body_normal', weight: 'medium' }, buttonVariant: 'card', className: 'choose-wallet-funding-method__options__option', children: method.label }, method.key));
|
|
25
25
|
}) })] }));
|