@dynamic-labs/sdk-react-core 3.0.0-alpha.52 → 3.0.0-alpha.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +13 -13
- package/src/index.cjs +7 -5
- package/src/index.d.ts +1 -1
- package/src/index.js +4 -3
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +17 -16
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +18 -17
- package/src/lib/components/Divider/Divider.cjs +2 -2
- package/src/lib/components/Divider/Divider.d.ts +2 -2
- package/src/lib/components/Divider/Divider.js +3 -3
- package/src/lib/components/IconWithSpinner/IconWithSpinner.cjs +1 -1
- package/src/lib/components/IconWithSpinner/IconWithSpinner.js +1 -1
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.cjs +1 -1
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.js +1 -1
- package/src/lib/components/IconWithStatus/IconWithStatus.cjs +1 -1
- package/src/lib/components/IconWithStatus/IconWithStatus.js +1 -1
- package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +5 -4
- package/src/lib/components/NeedHelpSection/NeedHelpSection.js +6 -5
- package/src/lib/components/QrCodeWrapper/QrCodeWrapper.cjs +1 -1
- package/src/lib/components/QrCodeWrapper/QrCodeWrapper.js +1 -1
- package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.cjs +11 -10
- package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.js +12 -11
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +1 -1
- package/src/lib/components/SendBalancePageLayout/components/TokensBalanceDropdown/TokensBalanceDropdown.cjs +6 -1
- package/src/lib/components/SendBalancePageLayout/components/TokensBalanceDropdown/TokensBalanceDropdown.js +6 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +1 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.d.ts +0 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +1 -1
- package/src/lib/context/DynamicContext/DynamicContext.cjs +6 -12
- package/src/lib/context/DynamicContext/DynamicContext.js +6 -12
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.cjs +1 -1
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.js +1 -1
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/types.d.ts +2 -2
- package/src/lib/context/DynamicContext/types/DynamicContextProps.d.ts +7 -0
- package/src/lib/context/DynamicContext/types/IDynamicContext.d.ts +4 -5
- package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.d.ts +2 -2
- package/src/lib/context/ReinitializeContext/ReinitializeContextProvider.cjs +1 -1
- package/src/lib/context/ReinitializeContext/ReinitializeContextProvider.js +1 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.d.ts +2 -2
- package/src/lib/context/UserWalletsContext/UserWalletsContext.d.ts +1 -1
- package/src/lib/context/WalletContext/WalletContext.cjs +1 -84
- package/src/lib/context/WalletContext/WalletContext.d.ts +1 -2
- package/src/lib/context/WalletContext/WalletContext.js +1 -84
- package/src/lib/context/WidgetRegistry/WidgetRegistryContextProvider.cjs +1 -1
- package/src/lib/context/WidgetRegistry/WidgetRegistryContextProvider.js +1 -1
- package/src/lib/data/api/api.cjs +1 -1
- package/src/lib/data/api/api.js +1 -1
- package/src/lib/locale/en/translation.cjs +39 -5
- package/src/lib/locale/en/translation.d.ts +39 -5
- package/src/lib/locale/en/translation.js +39 -5
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +1 -1
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +1 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +10 -9
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +11 -10
- package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.cjs +4 -4
- package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.d.ts +1 -1
- package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.js +4 -4
- package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.types.d.ts +2 -0
- package/src/lib/shared/assets/arrow-circle-right.cjs +54 -0
- package/src/lib/shared/assets/arrow-circle-right.js +30 -0
- package/src/lib/shared/assets/index.d.ts +1 -0
- package/src/lib/shared/types/wallets.d.ts +2 -2
- package/src/lib/shared/utils/functions/usingSessionKeys/usingSessionKeys.cjs +1 -1
- package/src/lib/shared/utils/functions/usingSessionKeys/usingSessionKeys.js +2 -2
- package/src/lib/shared/utils/functions/wallet/createWallet.d.ts +2 -2
- package/src/lib/store/utils/storeAuthTokenAndUser/storeAuthTokenAndUser.cjs +1 -1
- package/src/lib/store/utils/storeAuthTokenAndUser/storeAuthTokenAndUser.js +1 -1
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/errors.cjs +0 -2
- package/src/lib/utils/constants/errors.js +1 -2
- package/src/lib/utils/functions/findTurnkeyWallet/findTurnkeyWallet.d.ts +2 -2
- package/src/lib/utils/{hooks/useWalletConnectors/utils/findWallet/findWallet.cjs → functions/findWalletOptionFor/findWalletOptionFor.cjs} +3 -3
- package/src/lib/utils/functions/findWalletOptionFor/findWalletOptionFor.d.ts +3 -0
- package/src/lib/utils/{hooks/useWalletConnectors/utils/findWallet/findWallet.js → functions/findWalletOptionFor/findWalletOptionFor.js} +3 -3
- package/src/lib/utils/functions/findWalletOptionFor/index.d.ts +1 -0
- package/src/lib/utils/functions/generateMessages/index.cjs +3 -2
- package/src/lib/utils/functions/generateMessages/index.js +3 -2
- package/src/lib/utils/functions/getEmbeddedWalletAuthHandler/getEmbeddedWalletAuthHandler.d.ts +2 -2
- package/src/lib/utils/functions/getEnabledEmbeddedWalletProviders/getEnabledEmbeddedWalletProviders.cjs +1 -1
- package/src/lib/utils/functions/getEnabledEmbeddedWalletProviders/getEnabledEmbeddedWalletProviders.js +1 -1
- package/src/lib/utils/functions/getUserIdentifier/getUserIdentifier.cjs +1 -1
- package/src/lib/utils/functions/getUserIdentifier/getUserIdentifier.js +1 -1
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.d.ts +1 -2
- package/src/lib/utils/functions/getWalletConnectorForWallet/getWalletConnectorForWallet.d.ts +2 -2
- package/src/lib/utils/functions/index.d.ts +0 -2
- package/src/lib/utils/functions/isAccountAbstractionWallet/isAccountAbstractionWallet.d.ts +1 -1
- package/src/lib/utils/functions/isAllowedToLinkWallet/isAllowedToLinkWallet.cjs +1 -1
- package/src/lib/utils/functions/isAllowedToLinkWallet/isAllowedToLinkWallet.js +1 -1
- package/src/lib/utils/functions/isPhoneNumberProviderEnabled/isPhoneNumberProviderEnabled.cjs +1 -1
- package/src/lib/utils/functions/isPhoneNumberProviderEnabled/isPhoneNumberProviderEnabled.js +1 -1
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/requiresPasswordForEmbeddedWalletOnSignup.cjs +1 -1
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/requiresPasswordForEmbeddedWalletOnSignup.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.d.ts +2 -2
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.d.ts +2 -2
- package/src/lib/utils/hooks/index.d.ts +1 -0
- package/src/lib/utils/hooks/multiWallet/index.d.ts +0 -1
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +8 -7
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +2 -2
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +9 -8
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.d.ts +2 -2
- package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.d.ts +1 -1
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +3 -4
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +3 -4
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.d.ts +1 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.cjs +4 -6
- package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.d.ts +1 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.js +5 -7
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.cjs +86 -61
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.d.ts +3 -3
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.js +87 -63
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.cjs +32 -30
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.d.ts +1 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.js +33 -31
- package/src/lib/utils/hooks/useEmbeddedWalletAuthenticator/useEmbeddedWalletAuthenticator.d.ts +1 -1
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.cjs +7 -6
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.js +7 -6
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.cjs +11 -9
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.js +12 -10
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs +8 -12
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js +8 -12
- package/src/lib/utils/hooks/useNetworkDataFromWallet/useNetworkDataFromWallet.cjs +1 -1
- package/src/lib/utils/hooks/useNetworkDataFromWallet/useNetworkDataFromWallet.js +1 -1
- package/src/lib/utils/hooks/useNetworkNotSupported/useNetworkNotSupported.cjs +6 -5
- package/src/lib/utils/hooks/useNetworkNotSupported/useNetworkNotSupported.js +6 -5
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +12 -11
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.d.ts +2 -2
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +12 -11
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.cjs +3 -3
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.js +3 -3
- package/src/lib/utils/hooks/useSmartWallets/index.d.ts +1 -0
- package/src/lib/utils/hooks/useSmartWallets/useSmartWallets.cjs +159 -0
- package/src/lib/utils/hooks/useSmartWallets/useSmartWallets.d.ts +18 -0
- package/src/lib/utils/hooks/useSmartWallets/useSmartWallets.js +155 -0
- package/src/lib/utils/hooks/useSwitchWallet/useSwitchWallet.cjs +1 -4
- package/src/lib/utils/hooks/useSwitchWallet/useSwitchWallet.js +1 -4
- package/src/lib/utils/hooks/useWalletConnectorOptions/useWalletConnectorOptions.cjs +1 -1
- package/src/lib/utils/hooks/useWalletConnectorOptions/useWalletConnectorOptions.d.ts +2 -2
- package/src/lib/utils/hooks/useWalletConnectorOptions/useWalletConnectorOptions.js +1 -1
- package/src/lib/utils/hooks/useWalletConnectorOptions/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs +1 -1
- package/src/lib/utils/hooks/useWalletConnectorOptions/utils/verifyMagicIsSetup/verifyMagicIsSetup.js +1 -1
- package/src/lib/utils/hooks/useWalletConnectorOptions/utils/verifyZeroDevIsSetup/verifyZeroDevIsSetup.cjs +1 -1
- package/src/lib/utils/hooks/useWalletConnectorOptions/utils/verifyZeroDevIsSetup/verifyZeroDevIsSetup.js +1 -1
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.cjs +7 -87
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.d.ts +2 -2
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.js +8 -88
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +9 -79
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.d.ts +4 -10
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +10 -80
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.cjs +5 -89
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.d.ts +2 -3
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.js +5 -89
- package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.cjs +4 -4
- package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.js +5 -5
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +26 -29
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +2 -1
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +26 -29
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +1 -1
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.d.ts +6 -6
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +1 -1
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.types.d.ts +4 -4
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +16 -7
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.d.ts +2 -2
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +16 -7
- package/src/lib/views/CollectUserDataView/UserDataFields/UserField/UserField.cjs +1 -1
- package/src/lib/views/CollectUserDataView/UserDataFields/UserField/UserField.js +1 -1
- package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.cjs +2 -2
- package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.js +2 -2
- package/src/lib/views/EmailVerification/EmailVerification.cjs +19 -18
- package/src/lib/views/EmailVerification/EmailVerification.js +20 -19
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +52 -52
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +53 -53
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +1 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +1 -1
- package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.cjs +1 -1
- package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.js +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.cjs +35 -33
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.d.ts +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.js +35 -33
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.cjs +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.js +1 -1
- package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.cjs +1 -1
- package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.js +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.cjs +35 -33
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.d.ts +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.js +35 -33
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.cjs +33 -31
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.js +33 -31
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +1 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +7 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.js +7 -1
- package/src/lib/{utils/functions/getEOAWallet/getEOAWallet.cjs → views/SyncWalletView/AutoReconnectingView/AutoReconnectingView.cjs} +57 -50
- package/src/lib/views/SyncWalletView/AutoReconnectingView/AutoReconnectingView.d.ts +9 -0
- package/src/lib/{utils/functions/getEOAWallet/getEOAWallet.js → views/SyncWalletView/AutoReconnectingView/AutoReconnectingView.js} +57 -50
- package/src/lib/views/SyncWalletView/AutoReconnectingView/index.d.ts +1 -0
- package/src/lib/views/SyncWalletView/ReconnectWithQrCodeView/ReconnectWithQrCodeView.cjs +126 -0
- package/src/lib/views/SyncWalletView/ReconnectWithQrCodeView/ReconnectWithQrCodeView.d.ts +9 -0
- package/src/lib/views/SyncWalletView/ReconnectWithQrCodeView/ReconnectWithQrCodeView.js +122 -0
- package/src/lib/views/SyncWalletView/ReconnectWithQrCodeView/index.d.ts +1 -0
- package/src/lib/views/SyncWalletView/SwitchWalletView/SwitchWalletView.cjs +101 -0
- package/src/lib/views/SyncWalletView/SwitchWalletView/SwitchWalletView.d.ts +10 -0
- package/src/lib/views/SyncWalletView/SwitchWalletView/SwitchWalletView.js +97 -0
- package/src/lib/views/SyncWalletView/SwitchWalletView/index.d.ts +1 -0
- package/src/lib/views/SyncWalletView/SyncWalletView.cjs +74 -49
- package/src/lib/views/SyncWalletView/SyncWalletView.d.ts +2 -0
- package/src/lib/views/SyncWalletView/SyncWalletView.js +75 -50
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +1 -1
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +1 -1
- package/src/lib/views/WalletGroupView/WalletGroupView.cjs +2 -2
- package/src/lib/views/WalletGroupView/WalletGroupView.js +2 -2
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +1 -1
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.js +1 -1
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +1 -1
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +1 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +6 -5
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +6 -5
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithNetwork/WalletIconWithNetwork.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithNetwork/WalletIconWithNetwork.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.d.ts +3 -1
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +7 -9
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +7 -9
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +46 -45
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +47 -46
- package/src/lib/utils/functions/createOwnerWallet/createOwnerWallet.cjs +0 -40
- package/src/lib/utils/functions/createOwnerWallet/createOwnerWallet.d.ts +0 -3
- package/src/lib/utils/functions/createOwnerWallet/createOwnerWallet.js +0 -36
- package/src/lib/utils/functions/createOwnerWallet/index.d.ts +0 -1
- package/src/lib/utils/functions/getEOAWallet/getEOAWallet.d.ts +0 -3
- package/src/lib/utils/functions/getEOAWallet/index.d.ts +0 -1
- package/src/lib/utils/functions/getWalletIdentifier/getWalletIdentifier.cjs +0 -8
- package/src/lib/utils/functions/getWalletIdentifier/getWalletIdentifier.js +0 -4
- package/src/lib/utils/functions/isWalletConnected/isWalletConnected.cjs +0 -14
- package/src/lib/utils/functions/isWalletConnected/isWalletConnected.js +0 -10
- package/src/lib/utils/hooks/events/useWindowEvent/useWindowEvent.cjs +0 -25
- package/src/lib/utils/hooks/events/useWindowEvent/useWindowEvent.js +0 -21
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/index.d.ts +0 -1
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +0 -209
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +0 -1
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +0 -205
- package/src/lib/utils/hooks/useWalletConnectors/utils/findWallet/findWallet.d.ts +0 -3
- package/src/lib/utils/hooks/useWalletConnectors/utils/findWallet/index.d.ts +0 -1
- package/src/lib/utils/hooks/useWalletsConnectionState/index.d.ts +0 -1
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.cjs +0 -184
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.d.ts +0 -12
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.js +0 -180
|
@@ -211,7 +211,7 @@ const TransactionConfirmationView = ({ transaction, onError, onSuccess, mutation
|
|
|
211
211
|
isNativeToken,
|
|
212
212
|
isLoading,
|
|
213
213
|
]);
|
|
214
|
-
return (jsxRuntime.jsxs(TransactionConfirmationPageLayout.TransactionConfirmationPageLayout, { onClickBack: onClickBack, onClickClose: onClickClose, copykey: copykey, title: title, appOrigin: appOrigin, appName: appName, appLogoUrl: appLogoUrl, hideModal: hideModal, isLoading: isLoading, onClickSend: () => send(), onSuccess: (tx) => onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(tx), displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, disableSendButton: isBalanceLoading, error: errorMessage, alert: alert, walletConnector: walletConnector, transaction: transaction, total: total, currentToken: currentToken, transactionValue: transactionValue,
|
|
214
|
+
return (jsxRuntime.jsxs(TransactionConfirmationPageLayout.TransactionConfirmationPageLayout, { onClickBack: onClickBack, onClickClose: onClickClose, copykey: copykey, title: title, appOrigin: appOrigin, appName: appName, appLogoUrl: appLogoUrl, hideModal: hideModal, isLoading: isLoading, onClickSend: () => send(), onSuccess: (tx) => onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(tx), displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, disableSendButton: isBalanceLoading, error: errorMessage, alert: alert, walletConnector: walletConnector, transaction: transaction, total: total, currentToken: currentToken, transactionValue: transactionValue, isNativeToken: isNativeToken, isGasSponsored: isGasSponsored, isGasSponsoredLoading: isGasSponsoredLoading, chainName: chainName, nativePrice: nativePrice, walletKey: (primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.key) || '', children: [jsxRuntime.jsxs("div", { className: 'row flex', "data-testid": 'transaction-wallet_used', children: [jsxRuntime.jsx(Typography.Typography, { weight: 'regular', color: 'secondary', className: 'label', children: t('dyn_send_transaction.confirmation.data.wallet_used') }), jsxRuntime.jsxs(Typography.Typography, { weight: 'regular', color: 'primary', className: 'flex gap', children: [jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.key, width: 20, height: 20 }), ' ', shortenWalletAddress.shortenWalletAddress(transaction.from, 4, 4)] })] }), isModal && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: 'row flex', "data-testid": 'transaction-destination', children: [jsxRuntime.jsx(Typography.Typography, { weight: 'regular', color: 'secondary', className: 'label', children: t('dyn_send_transaction.confirmation.data.destination') }), jsxRuntime.jsxs(Typography.Typography, { weight: 'regular', color: 'primary', className: 'flex gap', children: [jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.key, width: 20, height: 20 }), ' ', shortenWalletAddress.shortenWalletAddress(transaction.to, 4, 4)] })] }), jsxRuntime.jsxs("div", { className: 'row flex', "data-testid": 'transaction-amount', children: [jsxRuntime.jsx(Typography.Typography, { weight: 'regular', color: 'secondary', className: 'label', children: t('dyn_send_transaction.confirmation.data.amount') }), jsxRuntime.jsx(Typography.Typography, { weight: 'regular', color: 'primary', className: 'flex gap', children: transaction.value
|
|
215
215
|
? transaction.format(transaction.value, { precision: 6 })
|
|
216
216
|
: '' })] })] })), jsxRuntime.jsxs("div", { className: 'row flex', "data-testid": 'transaction-network_used', children: [jsxRuntime.jsx(Typography.Typography, { weight: 'regular', color: 'secondary', className: 'label', children: t('dyn_send_transaction.confirmation.data.network_used') }), jsxRuntime.jsx(Typography.Typography, { weight: 'regular', color: 'primary', children: chainName })] })] }));
|
|
217
217
|
};
|
|
@@ -207,7 +207,7 @@ const TransactionConfirmationView = ({ transaction, onError, onSuccess, mutation
|
|
|
207
207
|
isNativeToken,
|
|
208
208
|
isLoading,
|
|
209
209
|
]);
|
|
210
|
-
return (jsxs(TransactionConfirmationPageLayout, { onClickBack: onClickBack, onClickClose: onClickClose, copykey: copykey, title: title, appOrigin: appOrigin, appName: appName, appLogoUrl: appLogoUrl, hideModal: hideModal, isLoading: isLoading, onClickSend: () => send(), onSuccess: (tx) => onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(tx), displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, disableSendButton: isBalanceLoading, error: errorMessage, alert: alert, walletConnector: walletConnector, transaction: transaction, total: total, currentToken: currentToken, transactionValue: transactionValue,
|
|
210
|
+
return (jsxs(TransactionConfirmationPageLayout, { onClickBack: onClickBack, onClickClose: onClickClose, copykey: copykey, title: title, appOrigin: appOrigin, appName: appName, appLogoUrl: appLogoUrl, hideModal: hideModal, isLoading: isLoading, onClickSend: () => send(), onSuccess: (tx) => onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(tx), displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, disableSendButton: isBalanceLoading, error: errorMessage, alert: alert, walletConnector: walletConnector, transaction: transaction, total: total, currentToken: currentToken, transactionValue: transactionValue, isNativeToken: isNativeToken, isGasSponsored: isGasSponsored, isGasSponsoredLoading: isGasSponsoredLoading, chainName: chainName, nativePrice: nativePrice, walletKey: (primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.key) || '', children: [jsxs("div", { className: 'row flex', "data-testid": 'transaction-wallet_used', children: [jsx(Typography, { weight: 'regular', color: 'secondary', className: 'label', children: t('dyn_send_transaction.confirmation.data.wallet_used') }), jsxs(Typography, { weight: 'regular', color: 'primary', className: 'flex gap', children: [jsx(WalletIcon, { walletKey: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.key, width: 20, height: 20 }), ' ', shortenWalletAddress(transaction.from, 4, 4)] })] }), isModal && (jsxs(Fragment, { children: [jsxs("div", { className: 'row flex', "data-testid": 'transaction-destination', children: [jsx(Typography, { weight: 'regular', color: 'secondary', className: 'label', children: t('dyn_send_transaction.confirmation.data.destination') }), jsxs(Typography, { weight: 'regular', color: 'primary', className: 'flex gap', children: [jsx(WalletIcon, { walletKey: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.key, width: 20, height: 20 }), ' ', shortenWalletAddress(transaction.to, 4, 4)] })] }), jsxs("div", { className: 'row flex', "data-testid": 'transaction-amount', children: [jsx(Typography, { weight: 'regular', color: 'secondary', className: 'label', children: t('dyn_send_transaction.confirmation.data.amount') }), jsx(Typography, { weight: 'regular', color: 'primary', className: 'flex gap', children: transaction.value
|
|
211
211
|
? transaction.format(transaction.value, { precision: 6 })
|
|
212
212
|
: '' })] })] })), jsxs("div", { className: 'row flex', "data-testid": 'transaction-network_used', children: [jsx(Typography, { weight: 'regular', color: 'secondary', className: 'label', children: t('dyn_send_transaction.confirmation.data.network_used') }), jsx(Typography, { weight: 'regular', color: 'primary', children: chainName })] })] }));
|
|
213
213
|
};
|
|
@@ -103,8 +103,8 @@ const WalletGroupView = () => {
|
|
|
103
103
|
const walletBookData = walletBook.getWalletGroup(walletBook$1, selectedWalletGroup === null || selectedWalletGroup === void 0 ? void 0 : selectedWalletGroup.key);
|
|
104
104
|
const hardwareWalletConnectors = selectedWalletGroup.groupedWallets
|
|
105
105
|
.map(({ walletConnector }) => walletConnector)
|
|
106
|
-
.filter(walletConnectorCore.isHardwareWalletConnector)
|
|
107
|
-
|
|
106
|
+
.filter((connector) => walletConnectorCore.isHardwareWalletConnector(connector) &&
|
|
107
|
+
connector.canConnectWithHardwareWallet());
|
|
108
108
|
return (jsxRuntime.jsx(WalletGroupViewLayout.WalletGroupViewLayout, { icon: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletBookData.key }), title: t('dyn_select_chain.description'), titleCopyKey: 'dyn_select_chain.description', children: jsxRuntime.jsxs("div", { className: 'wallet-group__list', children: [Boolean(hardwareWalletConnectors.length) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(HardwareWalletToggle.HardwareWalletToggle, { connectors: hardwareWalletConnectors, copykey: 'dyn_select_chain.using_hardware_wallet_toggle_label', label: t('dyn_select_chain.using_hardware_wallet_toggle_label') }), jsxRuntime.jsx(Divider.Divider, {})] })), jsxRuntime.jsx("div", { className: 'wallet-group-view-layout__list', children: selectedWalletGroup.groupedWallets.map((wallet, index) => (jsxRuntime.jsx(WalletGroupItem.WalletGroupItem, { wallet: wallet, onClick: () => handleWalletItemClick(wallet) }, `${wallet.key}_${index}`))) })] }) }));
|
|
109
109
|
};
|
|
110
110
|
|
|
@@ -99,8 +99,8 @@ const WalletGroupView = () => {
|
|
|
99
99
|
const walletBookData = getWalletGroup(walletBook, selectedWalletGroup === null || selectedWalletGroup === void 0 ? void 0 : selectedWalletGroup.key);
|
|
100
100
|
const hardwareWalletConnectors = selectedWalletGroup.groupedWallets
|
|
101
101
|
.map(({ walletConnector }) => walletConnector)
|
|
102
|
-
.filter(isHardwareWalletConnector)
|
|
103
|
-
|
|
102
|
+
.filter((connector) => isHardwareWalletConnector(connector) &&
|
|
103
|
+
connector.canConnectWithHardwareWallet());
|
|
104
104
|
return (jsx(WalletGroupViewLayout, { icon: jsx(WalletIcon, { walletKey: walletBookData.key }), title: t('dyn_select_chain.description'), titleCopyKey: 'dyn_select_chain.description', children: jsxs("div", { className: 'wallet-group__list', children: [Boolean(hardwareWalletConnectors.length) && (jsxs(Fragment, { children: [jsx(HardwareWalletToggle, { connectors: hardwareWalletConnectors, copykey: 'dyn_select_chain.using_hardware_wallet_toggle_label', label: t('dyn_select_chain.using_hardware_wallet_toggle_label') }), jsx(Divider, {})] })), jsx("div", { className: 'wallet-group-view-layout__list', children: selectedWalletGroup.groupedWallets.map((wallet, index) => (jsx(WalletGroupItem, { wallet: wallet, onClick: () => handleWalletItemClick(wallet) }, `${wallet.key}_${index}`))) })] }) }));
|
|
105
105
|
};
|
|
106
106
|
|
|
@@ -74,6 +74,7 @@ require('../../../../components/Input/Input.cjs');
|
|
|
74
74
|
require('@dynamic-labs/ethereum-core');
|
|
75
75
|
require('../../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
76
76
|
require('../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
77
|
+
var Badge = require('../../../../components/Badge/Badge.cjs');
|
|
77
78
|
require('../../../../../polyfills.cjs');
|
|
78
79
|
require('../../../../context/ErrorBoundary/ErrorBoundaryBase.cjs');
|
|
79
80
|
require('../../../../context/ErrorBoundary/ErrorBoundaryContext.cjs');
|
|
@@ -87,7 +88,6 @@ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
87
88
|
require('../../../WalletList/WalletList.cjs');
|
|
88
89
|
require('../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
89
90
|
require('@hcaptcha/react-hcaptcha');
|
|
90
|
-
var Badge = require('../../../../components/Badge/Badge.cjs');
|
|
91
91
|
require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
92
92
|
require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
93
93
|
require('../../../../context/SendBalanceContext/SendBalanceContext.cjs');
|
|
@@ -70,6 +70,7 @@ import '../../../../components/Input/Input.js';
|
|
|
70
70
|
import '@dynamic-labs/ethereum-core';
|
|
71
71
|
import '../../../../context/PasskeyContext/PasskeyContext.js';
|
|
72
72
|
import '../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
73
|
+
import { Badge } from '../../../../components/Badge/Badge.js';
|
|
73
74
|
import '../../../../../polyfills.js';
|
|
74
75
|
import '../../../../context/ErrorBoundary/ErrorBoundaryBase.js';
|
|
75
76
|
import '../../../../context/ErrorBoundary/ErrorBoundaryContext.js';
|
|
@@ -83,7 +84,6 @@ import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
83
84
|
import '../../../WalletList/WalletList.js';
|
|
84
85
|
import '../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
85
86
|
import '@hcaptcha/react-hcaptcha';
|
|
86
|
-
import { Badge } from '../../../../components/Badge/Badge.js';
|
|
87
87
|
import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
88
88
|
import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
89
89
|
import '../../../../context/SendBalanceContext/SendBalanceContext.js';
|
|
@@ -75,6 +75,7 @@ require('../../../components/Input/Input.cjs');
|
|
|
75
75
|
require('@dynamic-labs/ethereum-core');
|
|
76
76
|
require('../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
77
77
|
require('../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
78
|
+
var Badge = require('../../../components/Badge/Badge.cjs');
|
|
78
79
|
require('../../../../polyfills.cjs');
|
|
79
80
|
require('../../../context/ErrorBoundary/ErrorBoundaryBase.cjs');
|
|
80
81
|
require('../../../context/ErrorBoundary/ErrorBoundaryContext.cjs');
|
|
@@ -88,7 +89,6 @@ require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
88
89
|
require('../WalletList.cjs');
|
|
89
90
|
require('../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
90
91
|
require('@hcaptcha/react-hcaptcha');
|
|
91
|
-
var Badge = require('../../../components/Badge/Badge.cjs');
|
|
92
92
|
require('../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
93
93
|
require('../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
94
94
|
require('../../../context/SendBalanceContext/SendBalanceContext.cjs');
|
|
@@ -71,6 +71,7 @@ import '../../../components/Input/Input.js';
|
|
|
71
71
|
import '@dynamic-labs/ethereum-core';
|
|
72
72
|
import '../../../context/PasskeyContext/PasskeyContext.js';
|
|
73
73
|
import '../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
74
|
+
import { Badge } from '../../../components/Badge/Badge.js';
|
|
74
75
|
import '../../../../polyfills.js';
|
|
75
76
|
import '../../../context/ErrorBoundary/ErrorBoundaryBase.js';
|
|
76
77
|
import '../../../context/ErrorBoundary/ErrorBoundaryContext.js';
|
|
@@ -84,7 +85,6 @@ import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
84
85
|
import '../WalletList.js';
|
|
85
86
|
import '../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
86
87
|
import '@hcaptcha/react-hcaptcha';
|
|
87
|
-
import { Badge } from '../../../components/Badge/Badge.js';
|
|
88
88
|
import '../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
89
89
|
import '../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
90
90
|
import '../../../context/SendBalanceContext/SendBalanceContext.js';
|
|
@@ -86,6 +86,7 @@ require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
86
86
|
require('../WalletList/WalletList.cjs');
|
|
87
87
|
require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
88
88
|
require('@hcaptcha/react-hcaptcha');
|
|
89
|
+
var Checkbox = require('../../components/Checkbox/Checkbox.cjs');
|
|
89
90
|
require('../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
90
91
|
require('../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
91
92
|
var useTransferWallet = require('../../utils/hooks/useTransferWallet/useTransferWallet.cjs');
|
|
@@ -93,7 +94,6 @@ require('../../context/SendBalanceContext/SendBalanceContext.cjs');
|
|
|
93
94
|
require('../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
94
95
|
require('../../context/ConnectWithOtpContext/constants.cjs');
|
|
95
96
|
require('../../context/ReinitializeContext/ReinitializeContextProvider.cjs');
|
|
96
|
-
var Checkbox = require('../../components/Checkbox/Checkbox.cjs');
|
|
97
97
|
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
98
98
|
require('qrcode');
|
|
99
99
|
|
|
@@ -82,6 +82,7 @@ import '../../components/Popper/PopperContext/PopperContext.js';
|
|
|
82
82
|
import '../WalletList/WalletList.js';
|
|
83
83
|
import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
84
84
|
import '@hcaptcha/react-hcaptcha';
|
|
85
|
+
import { Checkbox } from '../../components/Checkbox/Checkbox.js';
|
|
85
86
|
import '../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
86
87
|
import '../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
87
88
|
import { useTransferWallet } from '../../utils/hooks/useTransferWallet/useTransferWallet.js';
|
|
@@ -89,7 +90,6 @@ import '../../context/SendBalanceContext/SendBalanceContext.js';
|
|
|
89
90
|
import '../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
90
91
|
import '../../context/ConnectWithOtpContext/constants.js';
|
|
91
92
|
import '../../context/ReinitializeContext/ReinitializeContextProvider.js';
|
|
92
|
-
import { Checkbox } from '../../components/Checkbox/Checkbox.js';
|
|
93
93
|
import '../../components/InlineWidget/InlineWidget.js';
|
|
94
94
|
import 'qrcode';
|
|
95
95
|
|
package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs
CHANGED
|
@@ -33,7 +33,6 @@ require('react-international-phone');
|
|
|
33
33
|
require('../../../../config/ApiEndpoint.cjs');
|
|
34
34
|
require('@dynamic-labs/store');
|
|
35
35
|
require('../../../../locale/locale.cjs');
|
|
36
|
-
var getEOAWallet = require('../../../../utils/functions/getEOAWallet/getEOAWallet.cjs');
|
|
37
36
|
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
38
37
|
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
39
38
|
require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
@@ -41,6 +40,7 @@ require('../../../../context/VerificationContext/VerificationContext.cjs');
|
|
|
41
40
|
require('react-dom');
|
|
42
41
|
require('../../../../context/WalletContext/WalletContext.cjs');
|
|
43
42
|
var useIsTurnkeyWallet = require('../../../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs');
|
|
43
|
+
var useSmartWallets = require('../../../../utils/hooks/useSmartWallets/useSmartWallets.cjs');
|
|
44
44
|
require('../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
|
|
45
45
|
var usePromise = require('../../../../utils/hooks/usePromise/usePromise.cjs');
|
|
46
46
|
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
@@ -109,7 +109,7 @@ var TokenBalanceList = require('./TokenBalanceList/TokenBalanceList.cjs');
|
|
|
109
109
|
|
|
110
110
|
const ICON_SIZE = 28;
|
|
111
111
|
const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
112
|
-
var _a, _b, _c, _d;
|
|
112
|
+
var _a, _b, _c, _d, _e;
|
|
113
113
|
const { t } = reactI18next.useTranslation();
|
|
114
114
|
const [isNetworkPickerOpen, setIsNetworkPickerOpen] = React.useState(false);
|
|
115
115
|
const [balanceIsExpanded, setBalanceIsExpanded] = React.useState(false);
|
|
@@ -127,14 +127,15 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
127
127
|
const filteredTokenBalances = (tokenBalances === null || tokenBalances === void 0 ? void 0 : tokenBalances.filter((token) => token.name)) || [];
|
|
128
128
|
const address = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.address;
|
|
129
129
|
const nameService = useFetchNameService.useFetchNameService(address);
|
|
130
|
+
const { getEOAWallet } = useSmartWallets.useSmartWallets();
|
|
130
131
|
const { data: testnet } = usePromise.usePromise(() => _tslib.__awaiter(void 0, void 0, void 0, function* () { return Boolean(yield (primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.isTestnet())); }), { deps: [network] });
|
|
131
132
|
const exportKeysOption = helpers.getExportKeysOption(primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector, projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers);
|
|
132
133
|
const { showAlert } = PasskeyContext.usePasskeyContext();
|
|
133
|
-
const wallet =
|
|
134
|
+
const wallet = (_a = (primaryWallet && getEOAWallet(primaryWallet))) !== null && _a !== void 0 ? _a : primaryWallet;
|
|
134
135
|
const isBitcoin = primaryWallet && walletConnectorCore.isBitcoinConnector(primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector);
|
|
135
136
|
const isEmbeddedWallet = Boolean(wallet &&
|
|
136
|
-
(((
|
|
137
|
-
((
|
|
137
|
+
(((_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')) ||
|
|
138
|
+
((_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'))));
|
|
138
139
|
const options = [
|
|
139
140
|
{
|
|
140
141
|
Icon: null,
|
package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js
CHANGED
|
@@ -29,7 +29,6 @@ import 'react-international-phone';
|
|
|
29
29
|
import '../../../../config/ApiEndpoint.js';
|
|
30
30
|
import '@dynamic-labs/store';
|
|
31
31
|
import '../../../../locale/locale.js';
|
|
32
|
-
import { getEOAWallet } from '../../../../utils/functions/getEOAWallet/getEOAWallet.js';
|
|
33
32
|
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
34
33
|
import '../../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
35
34
|
import '../../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
@@ -37,6 +36,7 @@ import '../../../../context/VerificationContext/VerificationContext.js';
|
|
|
37
36
|
import 'react-dom';
|
|
38
37
|
import '../../../../context/WalletContext/WalletContext.js';
|
|
39
38
|
import { useIsTurnkeyWallet } from '../../../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js';
|
|
39
|
+
import { useSmartWallets } from '../../../../utils/hooks/useSmartWallets/useSmartWallets.js';
|
|
40
40
|
import '../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
|
|
41
41
|
import { usePromise } from '../../../../utils/hooks/usePromise/usePromise.js';
|
|
42
42
|
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
@@ -105,7 +105,7 @@ import { TokenBalanceList } from './TokenBalanceList/TokenBalanceList.js';
|
|
|
105
105
|
|
|
106
106
|
const ICON_SIZE = 28;
|
|
107
107
|
const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
108
|
-
var _a, _b, _c, _d;
|
|
108
|
+
var _a, _b, _c, _d, _e;
|
|
109
109
|
const { t } = useTranslation();
|
|
110
110
|
const [isNetworkPickerOpen, setIsNetworkPickerOpen] = useState(false);
|
|
111
111
|
const [balanceIsExpanded, setBalanceIsExpanded] = useState(false);
|
|
@@ -123,14 +123,15 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
123
123
|
const filteredTokenBalances = (tokenBalances === null || tokenBalances === void 0 ? void 0 : tokenBalances.filter((token) => token.name)) || [];
|
|
124
124
|
const address = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.address;
|
|
125
125
|
const nameService = useFetchNameService(address);
|
|
126
|
+
const { getEOAWallet } = useSmartWallets();
|
|
126
127
|
const { data: testnet } = usePromise(() => __awaiter(void 0, void 0, void 0, function* () { return Boolean(yield (primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.isTestnet())); }), { deps: [network] });
|
|
127
128
|
const exportKeysOption = getExportKeysOption(primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector, projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers);
|
|
128
129
|
const { showAlert } = usePasskeyContext();
|
|
129
|
-
const wallet =
|
|
130
|
+
const wallet = (_a = (primaryWallet && getEOAWallet(primaryWallet))) !== null && _a !== void 0 ? _a : primaryWallet;
|
|
130
131
|
const isBitcoin = primaryWallet && isBitcoinConnector(primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector);
|
|
131
132
|
const isEmbeddedWallet = Boolean(wallet &&
|
|
132
|
-
(((
|
|
133
|
-
((
|
|
133
|
+
(((_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')) ||
|
|
134
|
+
((_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'))));
|
|
134
135
|
const options = [
|
|
135
136
|
{
|
|
136
137
|
Icon: null,
|
|
@@ -68,6 +68,7 @@ require('../../../../components/Input/Input.cjs');
|
|
|
68
68
|
require('@dynamic-labs/ethereum-core');
|
|
69
69
|
require('../../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
70
70
|
require('../../views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
71
|
+
var Badge = require('../../../../components/Badge/Badge.cjs');
|
|
71
72
|
require('../../../../../polyfills.cjs');
|
|
72
73
|
require('../../../../context/ErrorBoundary/ErrorBoundaryBase.cjs');
|
|
73
74
|
require('../../../../context/ErrorBoundary/ErrorBoundaryContext.cjs');
|
|
@@ -81,7 +82,6 @@ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
81
82
|
require('../../../../views/WalletList/WalletList.cjs');
|
|
82
83
|
require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
83
84
|
require('@hcaptcha/react-hcaptcha');
|
|
84
|
-
var Badge = require('../../../../components/Badge/Badge.cjs');
|
|
85
85
|
require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
86
86
|
require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
87
87
|
require('../../../../context/SendBalanceContext/SendBalanceContext.cjs');
|
|
@@ -64,6 +64,7 @@ import '../../../../components/Input/Input.js';
|
|
|
64
64
|
import '@dynamic-labs/ethereum-core';
|
|
65
65
|
import '../../../../context/PasskeyContext/PasskeyContext.js';
|
|
66
66
|
import '../../views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
67
|
+
import { Badge } from '../../../../components/Badge/Badge.js';
|
|
67
68
|
import '../../../../../polyfills.js';
|
|
68
69
|
import '../../../../context/ErrorBoundary/ErrorBoundaryBase.js';
|
|
69
70
|
import '../../../../context/ErrorBoundary/ErrorBoundaryContext.js';
|
|
@@ -77,7 +78,6 @@ import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
77
78
|
import '../../../../views/WalletList/WalletList.js';
|
|
78
79
|
import '../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
79
80
|
import '@hcaptcha/react-hcaptcha';
|
|
80
|
-
import { Badge } from '../../../../components/Badge/Badge.js';
|
|
81
81
|
import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
82
82
|
import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
83
83
|
import '../../../../context/SendBalanceContext/SendBalanceContext.js';
|
package/src/lib/widgets/DynamicWidget/components/WalletIconWithNetwork/WalletIconWithNetwork.cjs
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
require('@dynamic-labs/wallet-connector-core');
|
|
8
7
|
require('@dynamic-labs/sdk-api-core');
|
|
9
8
|
require('../../../../utils/constants/values.cjs');
|
|
10
9
|
require('@dynamic-labs/utils');
|
|
@@ -12,6 +11,7 @@ require('../../../../../../_virtual/_tslib.cjs');
|
|
|
12
11
|
require('@dynamic-labs/multi-wallet');
|
|
13
12
|
require('../../../../shared/logger.cjs');
|
|
14
13
|
var getChainIcon = require('../../../../shared/utils/functions/chain/getChainIcon.cjs');
|
|
14
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
15
15
|
require('@dynamic-labs/wallet-book');
|
|
16
16
|
require('../../../../utils/constants/colors.cjs');
|
|
17
17
|
require('../../../../shared/utils/classes/storage/localStorage.cjs');
|
package/src/lib/widgets/DynamicWidget/components/WalletIconWithNetwork/WalletIconWithNetwork.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import '@dynamic-labs/wallet-connector-core';
|
|
4
3
|
import '@dynamic-labs/sdk-api-core';
|
|
5
4
|
import '../../../../utils/constants/values.js';
|
|
6
5
|
import '@dynamic-labs/utils';
|
|
@@ -8,6 +7,7 @@ import '../../../../../../_virtual/_tslib.js';
|
|
|
8
7
|
import '@dynamic-labs/multi-wallet';
|
|
9
8
|
import '../../../../shared/logger.js';
|
|
10
9
|
import { getChainIcon } from '../../../../shared/utils/functions/chain/getChainIcon.js';
|
|
10
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
11
11
|
import '@dynamic-labs/wallet-book';
|
|
12
12
|
import '../../../../utils/constants/colors.js';
|
|
13
13
|
import '../../../../shared/utils/classes/storage/localStorage.js';
|
|
@@ -90,7 +90,7 @@ require('../../../../context/ReinitializeContext/ReinitializeContextProvider.cjs
|
|
|
90
90
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
91
91
|
require('qrcode');
|
|
92
92
|
|
|
93
|
-
const WidgetPortal = ({ children, onClose, disablePadding }) => (jsxRuntime.jsx("div", { className: 'widget-portal', onClick: onClose, "data-testid": 'backdrop', children: jsxRuntime.jsxs("div", { className: classNames.classNames('widget-portal__container', {
|
|
93
|
+
const WidgetPortal = ({ children, onClose, disablePadding, portalClassName, portalContainerClassName, }) => (jsxRuntime.jsx("div", { className: classNames.classNames(portalClassName, 'widget-portal'), onClick: onClose, "data-testid": 'backdrop', children: jsxRuntime.jsxs("div", { className: classNames.classNames(portalContainerClassName, 'widget-portal__container', {
|
|
94
94
|
'widget-portal__container--no-padding': disablePadding,
|
|
95
95
|
}), onClick: (e) => e.stopPropagation(), children: [onClose && (jsxRuntime.jsx("div", { className: 'widget-portal__container__header', children: jsxRuntime.jsx(IconButton.IconButton, { className: 'widget-portal__container__close-button', onClick: (e) => onClose(e), type: 'button', "data-testid": 'close-button', children: jsxRuntime.jsx(close.ReactComponent, {}) }) })), children] }) }));
|
|
96
96
|
|
|
@@ -5,6 +5,8 @@ type Props = {
|
|
|
5
5
|
onClose?: (e: {
|
|
6
6
|
stopPropagation: VoidFunction;
|
|
7
7
|
}) => void;
|
|
8
|
+
portalClassName?: string;
|
|
9
|
+
portalContainerClassName?: string;
|
|
8
10
|
};
|
|
9
|
-
export declare const WidgetPortal: ({ children, onClose, disablePadding }: Props) => JSX.Element;
|
|
11
|
+
export declare const WidgetPortal: ({ children, onClose, disablePadding, portalClassName, portalContainerClassName, }: Props) => JSX.Element;
|
|
10
12
|
export {};
|
|
@@ -86,7 +86,7 @@ import '../../../../context/ReinitializeContext/ReinitializeContextProvider.js';
|
|
|
86
86
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
87
87
|
import 'qrcode';
|
|
88
88
|
|
|
89
|
-
const WidgetPortal = ({ children, onClose, disablePadding }) => (jsx("div", { className: 'widget-portal', onClick: onClose, "data-testid": 'backdrop', children: jsxs("div", { className: classNames('widget-portal__container', {
|
|
89
|
+
const WidgetPortal = ({ children, onClose, disablePadding, portalClassName, portalContainerClassName, }) => (jsx("div", { className: classNames(portalClassName, 'widget-portal'), onClick: onClose, "data-testid": 'backdrop', children: jsxs("div", { className: classNames(portalContainerClassName, 'widget-portal__container', {
|
|
90
90
|
'widget-portal__container--no-padding': disablePadding,
|
|
91
91
|
}), onClick: (e) => e.stopPropagation(), children: [onClose && (jsx("div", { className: 'widget-portal__container__header', children: jsx(IconButton, { className: 'widget-portal__container__close-button', onClick: (e) => onClose(e), type: 'button', "data-testid": 'close-button', children: jsx(SvgClose, {}) }) })), children] }) }));
|
|
92
92
|
|
|
@@ -92,8 +92,8 @@ require('../../../../context/ReinitializeContext/ReinitializeContextProvider.cjs
|
|
|
92
92
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
93
93
|
require('qrcode');
|
|
94
94
|
|
|
95
|
-
const DefaultPromptLayout = ({ children, className = '', dataTestId = '', icon, title, }) => (jsxRuntime.jsxs("div", { className: classNames.classNames('default-prompt-modal', className), "data-testid": dataTestId, children: [icon && (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: 96, isSpinning:
|
|
96
|
-
const DefaultPromptModal = (props) => (jsxRuntime.jsx(WidgetPortal.WidgetPortal, { onClose: props.onClose, children: jsxRuntime.jsx(DefaultPromptLayout, Object.assign({}, props)) }));
|
|
95
|
+
const DefaultPromptLayout = ({ children, className = '', dataTestId = '', icon, showSpinnerInIcon = true, title, }) => (jsxRuntime.jsxs("div", { className: classNames.classNames('default-prompt-modal', className), "data-testid": dataTestId, children: [icon && (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: 96, isSpinning: showSpinnerInIcon, className: 'default-prompt-modal__icon-with-spinner' })), jsxRuntime.jsxs("div", { className: 'default-prompt-modal__content', children: [title && (jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', "data-testid": 'title', children: title })), children] })] }));
|
|
96
|
+
const DefaultPromptModal = (props) => (jsxRuntime.jsx(WidgetPortal.WidgetPortal, { onClose: props.onClose, portalClassName: 'prompt-modal-portal', portalContainerClassName: 'prompt-modal-portal__container', children: jsxRuntime.jsx(DefaultPromptLayout, Object.assign({}, props)) }));
|
|
97
97
|
|
|
98
98
|
exports.DefaultPromptLayout = DefaultPromptLayout;
|
|
99
99
|
exports.DefaultPromptModal = DefaultPromptModal;
|
|
@@ -88,7 +88,7 @@ import '../../../../context/ReinitializeContext/ReinitializeContextProvider.js';
|
|
|
88
88
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
89
89
|
import 'qrcode';
|
|
90
90
|
|
|
91
|
-
const DefaultPromptLayout = ({ children, className = '', dataTestId = '', icon, title, }) => (jsxs("div", { className: classNames('default-prompt-modal', className), "data-testid": dataTestId, children: [icon && (jsx(IconWithSpinner, { Icon: icon, iconSize: 96, isSpinning:
|
|
92
|
-
const DefaultPromptModal = (props) => (jsx(WidgetPortal, { onClose: props.onClose, children: jsx(DefaultPromptLayout, Object.assign({}, props)) }));
|
|
91
|
+
const DefaultPromptLayout = ({ children, className = '', dataTestId = '', icon, showSpinnerInIcon = true, title, }) => (jsxs("div", { className: classNames('default-prompt-modal', className), "data-testid": dataTestId, children: [icon && (jsx(IconWithSpinner, { Icon: icon, iconSize: 96, isSpinning: showSpinnerInIcon, className: 'default-prompt-modal__icon-with-spinner' })), jsxs("div", { className: 'default-prompt-modal__content', children: [title && (jsx(Typography, { variant: 'title', color: 'primary', "data-testid": 'title', children: title })), children] })] }));
|
|
92
|
+
const DefaultPromptModal = (props) => (jsx(WidgetPortal, { onClose: props.onClose, portalClassName: 'prompt-modal-portal', portalContainerClassName: 'prompt-modal-portal__container', children: jsx(DefaultPromptLayout, Object.assign({}, props)) }));
|
|
93
93
|
|
|
94
94
|
export { DefaultPromptLayout, DefaultPromptModal };
|
package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs
CHANGED
|
@@ -63,7 +63,6 @@ var WidgetPortal = require('../../components/WidgetPortal/WidgetPortal.cjs');
|
|
|
63
63
|
var useCloseMultiWalletPrompt = require('../../hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.cjs');
|
|
64
64
|
var DefaultPromptModal = require('../DefaultPromptModal/DefaultPromptModal.cjs');
|
|
65
65
|
var HardwareWalletToggle = require('../../../../components/HardwareWalletToggle/HardwareWalletToggle.cjs');
|
|
66
|
-
var Divider = require('../../../../components/Divider/Divider.cjs');
|
|
67
66
|
require('../../context/DynamicWidgetContext.cjs');
|
|
68
67
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
69
68
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
@@ -94,7 +93,6 @@ require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
|
94
93
|
require('../../../../context/ConnectWithOtpContext/constants.cjs');
|
|
95
94
|
require('../../../../context/ReinitializeContext/ReinitializeContextProvider.cjs');
|
|
96
95
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
97
|
-
var LogoutButton = require('../../../../components/LogoutButton/LogoutButton.cjs');
|
|
98
96
|
require('react-focus-lock');
|
|
99
97
|
require('qrcode');
|
|
100
98
|
|
|
@@ -105,13 +103,13 @@ const DetectedNewWalletContent = () => {
|
|
|
105
103
|
setMultiWalletWidgetState('awaiting_signature', undefined, 'linking_new_wallet');
|
|
106
104
|
};
|
|
107
105
|
const walletConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
|
|
108
|
-
return (jsxRuntime.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
106
|
+
return (jsxRuntime.jsx(DefaultPromptModal.DefaultPromptLayout, { dataTestId: 'detected-new-wallet-modal', icon: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key }), title: t('dyn_detected_new_wallet.title'), children: jsxRuntime.jsxs("div", { className: 'detected-new-wallet-modal__top-section', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content', children: t('dyn_detected_new_wallet.description', {
|
|
107
|
+
walletName: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.name,
|
|
108
|
+
}) }), walletConnector &&
|
|
109
|
+
walletConnectorCore.isHardwareWalletConnector(walletConnector) &&
|
|
110
|
+
walletConnector.canConnectWithHardwareWallet() && (jsxRuntime.jsx(HardwareWalletToggle.HardwareWalletToggle, { connectors: [walletConnector], copykey: 'dyn_select_chain.using_hardware_wallet_toggle_label', label: t('dyn_select_chain.using_hardware_wallet_toggle_label') })), jsxRuntime.jsx(TypographyButton.TypographyButton, { expanded: true, onClick: handleClick, typographyProps: {
|
|
111
|
+
variant: 'button_secondary',
|
|
112
|
+
}, children: t('dyn_detected_new_wallet.confirm_button') })] }) }));
|
|
115
113
|
};
|
|
116
114
|
const DetectedNewWalletWidgetPortal = () => (jsxRuntime.jsx(WidgetPortal.WidgetPortal, { onClose: useCloseMultiWalletPrompt.useCloseMultiWalletPrompt(), children: jsxRuntime.jsx(DetectedNewWalletContent, {}) }));
|
|
117
115
|
const DetectedNewWalletModal = () => (jsxRuntime.jsx(PromptModal.PromptModal, { onClose: useCloseMultiWalletPrompt.useCloseMultiWalletPrompt(), children: jsxRuntime.jsx(DetectedNewWalletContent, {}) }));
|
package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js
CHANGED
|
@@ -59,7 +59,6 @@ import { WidgetPortal } from '../../components/WidgetPortal/WidgetPortal.js';
|
|
|
59
59
|
import { useCloseMultiWalletPrompt } from '../../hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.js';
|
|
60
60
|
import { DefaultPromptLayout } from '../DefaultPromptModal/DefaultPromptModal.js';
|
|
61
61
|
import { HardwareWalletToggle } from '../../../../components/HardwareWalletToggle/HardwareWalletToggle.js';
|
|
62
|
-
import { Divider } from '../../../../components/Divider/Divider.js';
|
|
63
62
|
import '../../context/DynamicWidgetContext.js';
|
|
64
63
|
import '../../../../components/IconButton/IconButton.js';
|
|
65
64
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
@@ -90,7 +89,6 @@ import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
|
90
89
|
import '../../../../context/ConnectWithOtpContext/constants.js';
|
|
91
90
|
import '../../../../context/ReinitializeContext/ReinitializeContextProvider.js';
|
|
92
91
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
93
|
-
import { LogoutButton } from '../../../../components/LogoutButton/LogoutButton.js';
|
|
94
92
|
import 'react-focus-lock';
|
|
95
93
|
import 'qrcode';
|
|
96
94
|
|
|
@@ -101,13 +99,13 @@ const DetectedNewWalletContent = () => {
|
|
|
101
99
|
setMultiWalletWidgetState('awaiting_signature', undefined, 'linking_new_wallet');
|
|
102
100
|
};
|
|
103
101
|
const walletConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
|
|
104
|
-
return (
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
102
|
+
return (jsx(DefaultPromptLayout, { dataTestId: 'detected-new-wallet-modal', icon: jsx(WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key }), title: t('dyn_detected_new_wallet.title'), children: jsxs("div", { className: 'detected-new-wallet-modal__top-section', children: [jsx(Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content', children: t('dyn_detected_new_wallet.description', {
|
|
103
|
+
walletName: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.name,
|
|
104
|
+
}) }), walletConnector &&
|
|
105
|
+
isHardwareWalletConnector(walletConnector) &&
|
|
106
|
+
walletConnector.canConnectWithHardwareWallet() && (jsx(HardwareWalletToggle, { connectors: [walletConnector], copykey: 'dyn_select_chain.using_hardware_wallet_toggle_label', label: t('dyn_select_chain.using_hardware_wallet_toggle_label') })), jsx(TypographyButton, { expanded: true, onClick: handleClick, typographyProps: {
|
|
107
|
+
variant: 'button_secondary',
|
|
108
|
+
}, children: t('dyn_detected_new_wallet.confirm_button') })] }) }));
|
|
111
109
|
};
|
|
112
110
|
const DetectedNewWalletWidgetPortal = () => (jsx(WidgetPortal, { onClose: useCloseMultiWalletPrompt(), children: jsx(DetectedNewWalletContent, {}) }));
|
|
113
111
|
const DetectedNewWalletModal = () => (jsx(PromptModal, { onClose: useCloseMultiWalletPrompt(), children: jsx(DetectedNewWalletContent, {}) }));
|