@dynamic-labs/sdk-react-core 3.0.0-alpha.51 → 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 +51 -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 +11 -16
- package/src/lib/context/DynamicContext/DynamicContext.js +11 -16
- 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/DynamicContext/types/SettingsOverrides.d.ts +3 -2
- 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/hooks/useNetworkConfigurations/useNetworkConfigurations.cjs +19 -4
- package/src/lib/store/hooks/useNetworkConfigurations/useNetworkConfigurations.d.ts +4 -3
- package/src/lib/store/hooks/useNetworkConfigurations/useNetworkConfigurations.js +19 -4
- 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
|
@@ -8,6 +8,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
8
8
|
var React = require('react');
|
|
9
9
|
var reactI18next = require('react-i18next');
|
|
10
10
|
var utils = require('@dynamic-labs/utils');
|
|
11
|
+
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
11
12
|
require('../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
12
13
|
require('../../components/Alert/Alert.cjs');
|
|
13
14
|
var AnimatePresence = require('../../components/AnimatePresence/AnimatePresence.cjs');
|
|
@@ -15,7 +16,6 @@ var AppOriginTile = require('../../components/AppOriginTile/AppOriginTile.cjs');
|
|
|
15
16
|
require('@dynamic-labs/sdk-api-core');
|
|
16
17
|
require('../../shared/logger.cjs');
|
|
17
18
|
require('@dynamic-labs/iconic');
|
|
18
|
-
require('@dynamic-labs/wallet-connector-core');
|
|
19
19
|
var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
|
|
20
20
|
var close = require('../../shared/assets/close.cjs');
|
|
21
21
|
var signCircle = require('../../shared/assets/sign-circle.cjs');
|
|
@@ -24,7 +24,6 @@ require('../../utils/constants/colors.cjs');
|
|
|
24
24
|
require('../../utils/constants/values.cjs');
|
|
25
25
|
require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
26
26
|
require('../../shared/utils/classes/storage/sessionStorage.cjs');
|
|
27
|
-
var usingSessionKeys = require('../../shared/utils/functions/usingSessionKeys/usingSessionKeys.cjs');
|
|
28
27
|
var useEffectOnce = require('../../shared/utils/hooks/useEffectOnce/useEffectOnce.cjs');
|
|
29
28
|
var usePreventPageScroll = require('../../shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.cjs');
|
|
30
29
|
var index = require('../../shared/consts/index.cjs');
|
|
@@ -49,6 +48,7 @@ require('../../context/VerificationContext/VerificationContext.cjs');
|
|
|
49
48
|
require('../../context/WalletContext/WalletContext.cjs');
|
|
50
49
|
var useIsTurnkeyWallet = require('../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs');
|
|
51
50
|
var usePasskeyRecovery = require('../../utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs');
|
|
51
|
+
var useSmartWallets = require('../../utils/hooks/useSmartWallets/useSmartWallets.cjs');
|
|
52
52
|
require('../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
|
|
53
53
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
54
54
|
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
|
|
@@ -102,13 +102,13 @@ require('../../views/WalletList/WalletList.cjs');
|
|
|
102
102
|
require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
103
103
|
require('@hcaptcha/react-hcaptcha');
|
|
104
104
|
require('../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
105
|
+
var NeedHelpSection = require('../../components/NeedHelpSection/NeedHelpSection.cjs');
|
|
105
106
|
var PasskeyCreatedSuccessBanner = require('../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
106
107
|
require('../../context/SendBalanceContext/SendBalanceContext.cjs');
|
|
107
108
|
require('../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
108
109
|
require('../../context/ConnectWithOtpContext/constants.cjs');
|
|
109
110
|
require('../../context/ReinitializeContext/ReinitializeContextProvider.cjs');
|
|
110
111
|
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
111
|
-
var NeedHelpSection = require('../../components/NeedHelpSection/NeedHelpSection.cjs');
|
|
112
112
|
require('qrcode');
|
|
113
113
|
var SignMessagePreview = require('../../components/SignMessagePreview/SignMessagePreview.cjs');
|
|
114
114
|
|
|
@@ -122,7 +122,8 @@ const SignMessageConfirmationModal = ({ appLogoUrl, appName, appOrigin, message,
|
|
|
122
122
|
const { setView } = ViewContext.useViewContext();
|
|
123
123
|
const { userNeedsCrossDomainPasskey } = PasskeyContext.usePasskeyContext();
|
|
124
124
|
const { t } = reactI18next.useTranslation();
|
|
125
|
-
const
|
|
125
|
+
const { getEOAWallet } = useSmartWallets.useSmartWallets();
|
|
126
|
+
const eoaWallet = primaryWallet && getEOAWallet(primaryWallet);
|
|
126
127
|
const handleOnReject = React.useCallback(() => {
|
|
127
128
|
didConfirmRef.current = false;
|
|
128
129
|
setShow(false);
|
|
@@ -154,19 +155,19 @@ const SignMessageConfirmationModal = ({ appLogoUrl, appName, appOrigin, message,
|
|
|
154
155
|
if (signedMessage) {
|
|
155
156
|
return onSignMessage(signedMessage);
|
|
156
157
|
}
|
|
157
|
-
onReject(signMessageError || new
|
|
158
|
+
onReject(signMessageError || new utils.UserRejectedRequestError());
|
|
158
159
|
}, [signedMessage, onSignMessage, onReject, signMessageError]);
|
|
159
160
|
const handleMessageSign = (signWithoutModal) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
const isSessionKeyCompatible = (primaryWallet && walletConnectorCore.isSessionKeyCompatibleWallet(primaryWallet)) ||
|
|
162
|
+
(eoaWallet && walletConnectorCore.isSessionKeyCompatibleWallet(eoaWallet));
|
|
163
|
+
if ((yield shouldInitRecovery()) && !isSessionKeyCompatible) {
|
|
163
164
|
yield initPasskeyRecoveryProcess('email', 'signMessage');
|
|
164
165
|
}
|
|
165
166
|
if (signWithoutModal === true) {
|
|
166
167
|
onSignMessage('callHandlerOutsideModal');
|
|
167
168
|
return;
|
|
168
169
|
}
|
|
169
|
-
if (
|
|
170
|
+
if (isSessionKeyCompatible) {
|
|
170
171
|
confirm();
|
|
171
172
|
return;
|
|
172
173
|
}
|
|
@@ -3,7 +3,8 @@ import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import { useRef, useState, useCallback, useMemo } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { DynamicError, AccessBlockedError } from '@dynamic-labs/utils';
|
|
6
|
+
import { DynamicError, AccessBlockedError, UserRejectedRequestError } from '@dynamic-labs/utils';
|
|
7
|
+
import { isSessionKeyCompatibleWallet } from '@dynamic-labs/wallet-connector-core';
|
|
7
8
|
import '../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
8
9
|
import '../../components/Alert/Alert.js';
|
|
9
10
|
import { AnimatePresence } from '../../components/AnimatePresence/AnimatePresence.js';
|
|
@@ -11,7 +12,6 @@ import { AppOriginTile } from '../../components/AppOriginTile/AppOriginTile.js';
|
|
|
11
12
|
import '@dynamic-labs/sdk-api-core';
|
|
12
13
|
import '../../shared/logger.js';
|
|
13
14
|
import '@dynamic-labs/iconic';
|
|
14
|
-
import '@dynamic-labs/wallet-connector-core';
|
|
15
15
|
import { useViewContext } from '../../context/ViewContext/ViewContext.js';
|
|
16
16
|
import { ReactComponent as SvgClose } from '../../shared/assets/close.js';
|
|
17
17
|
import { ReactComponent as SvgSignCircle } from '../../shared/assets/sign-circle.js';
|
|
@@ -20,7 +20,6 @@ import '../../utils/constants/colors.js';
|
|
|
20
20
|
import '../../utils/constants/values.js';
|
|
21
21
|
import '../../shared/utils/classes/storage/localStorage.js';
|
|
22
22
|
import '../../shared/utils/classes/storage/sessionStorage.js';
|
|
23
|
-
import { usingSessionKey } from '../../shared/utils/functions/usingSessionKeys/usingSessionKeys.js';
|
|
24
23
|
import { useEffectOnce } from '../../shared/utils/hooks/useEffectOnce/useEffectOnce.js';
|
|
25
24
|
import { usePreventPageScroll } from '../../shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.js';
|
|
26
25
|
import { authModalZIndex } from '../../shared/consts/index.js';
|
|
@@ -45,6 +44,7 @@ import '../../context/VerificationContext/VerificationContext.js';
|
|
|
45
44
|
import '../../context/WalletContext/WalletContext.js';
|
|
46
45
|
import { useIsTurnkeyWallet } from '../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js';
|
|
47
46
|
import { usePasskeyRecovery } from '../../utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js';
|
|
47
|
+
import { useSmartWallets } from '../../utils/hooks/useSmartWallets/useSmartWallets.js';
|
|
48
48
|
import '../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
|
|
49
49
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
50
50
|
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
|
|
@@ -98,13 +98,13 @@ import '../../views/WalletList/WalletList.js';
|
|
|
98
98
|
import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
99
99
|
import '@hcaptcha/react-hcaptcha';
|
|
100
100
|
import '../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
101
|
+
import { NeedHelpSection } from '../../components/NeedHelpSection/NeedHelpSection.js';
|
|
101
102
|
import { PasskeyCreatedSuccessBanner } from '../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
102
103
|
import '../../context/SendBalanceContext/SendBalanceContext.js';
|
|
103
104
|
import '../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
104
105
|
import '../../context/ConnectWithOtpContext/constants.js';
|
|
105
106
|
import '../../context/ReinitializeContext/ReinitializeContextProvider.js';
|
|
106
107
|
import '../../components/InlineWidget/InlineWidget.js';
|
|
107
|
-
import { NeedHelpSection } from '../../components/NeedHelpSection/NeedHelpSection.js';
|
|
108
108
|
import 'qrcode';
|
|
109
109
|
import { SignMessagePreview } from '../../components/SignMessagePreview/SignMessagePreview.js';
|
|
110
110
|
|
|
@@ -118,7 +118,8 @@ const SignMessageConfirmationModal = ({ appLogoUrl, appName, appOrigin, message,
|
|
|
118
118
|
const { setView } = useViewContext();
|
|
119
119
|
const { userNeedsCrossDomainPasskey } = usePasskeyContext();
|
|
120
120
|
const { t } = useTranslation();
|
|
121
|
-
const
|
|
121
|
+
const { getEOAWallet } = useSmartWallets();
|
|
122
|
+
const eoaWallet = primaryWallet && getEOAWallet(primaryWallet);
|
|
122
123
|
const handleOnReject = useCallback(() => {
|
|
123
124
|
didConfirmRef.current = false;
|
|
124
125
|
setShow(false);
|
|
@@ -150,19 +151,19 @@ const SignMessageConfirmationModal = ({ appLogoUrl, appName, appOrigin, message,
|
|
|
150
151
|
if (signedMessage) {
|
|
151
152
|
return onSignMessage(signedMessage);
|
|
152
153
|
}
|
|
153
|
-
onReject(signMessageError || new
|
|
154
|
+
onReject(signMessageError || new UserRejectedRequestError());
|
|
154
155
|
}, [signedMessage, onSignMessage, onReject, signMessageError]);
|
|
155
156
|
const handleMessageSign = (signWithoutModal) => __awaiter(void 0, void 0, void 0, function* () {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
const isSessionKeyCompatible = (primaryWallet && isSessionKeyCompatibleWallet(primaryWallet)) ||
|
|
158
|
+
(eoaWallet && isSessionKeyCompatibleWallet(eoaWallet));
|
|
159
|
+
if ((yield shouldInitRecovery()) && !isSessionKeyCompatible) {
|
|
159
160
|
yield initPasskeyRecoveryProcess('email', 'signMessage');
|
|
160
161
|
}
|
|
161
162
|
if (signWithoutModal === true) {
|
|
162
163
|
onSignMessage('callHandlerOutsideModal');
|
|
163
164
|
return;
|
|
164
165
|
}
|
|
165
|
-
if (
|
|
166
|
+
if (isSessionKeyCompatible) {
|
|
166
167
|
confirm();
|
|
167
168
|
return;
|
|
168
169
|
}
|
|
@@ -80,13 +80,13 @@ require('../../views/TransactionConfirmationView/helpers/transactionErrorMessage
|
|
|
80
80
|
require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
81
81
|
var SyncWalletView = require('../../views/SyncWalletView/SyncWalletView.cjs');
|
|
82
82
|
|
|
83
|
-
const SyncWalletPromptModal = ({ expectedAddress, connector, onResolve, }) => {
|
|
84
|
-
const { onSuccess, show, handleOnModalUnmount } = useConfirmationPortal.useConfirmationPortal({
|
|
83
|
+
const SyncWalletPromptModal = ({ expectedAddress, connector, onResolve, onReject, activeAddress, }) => {
|
|
84
|
+
const { onSuccess, onError, show, handleOnModalUnmount } = useConfirmationPortal.useConfirmationPortal({
|
|
85
85
|
defaultErrorMessage: 'User canceled',
|
|
86
|
-
onReject
|
|
86
|
+
onReject,
|
|
87
87
|
onResolve,
|
|
88
88
|
});
|
|
89
|
-
return (jsxRuntime.jsx(ConfirmationModal.ConfirmationModal, { modalId: 'sync-wallet-modal', show: show, closeModal: () => { }, handleOnModalUnmount: handleOnModalUnmount, children: jsxRuntime.jsx(SyncWalletView.SyncWalletView, { onSuccess: onSuccess, expectedAddress: expectedAddress, connector: connector }) }));
|
|
89
|
+
return (jsxRuntime.jsx(ConfirmationModal.ConfirmationModal, { modalId: 'sync-wallet-modal', show: show, closeModal: () => { }, handleOnModalUnmount: handleOnModalUnmount, children: jsxRuntime.jsx(SyncWalletView.SyncWalletView, { onSuccess: onSuccess, onError: onError, expectedAddress: expectedAddress, connector: connector, activeAddress: activeAddress }) }));
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
exports.SyncWalletPromptModal = SyncWalletPromptModal;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SyncWalletPromptModalProps } from './SyncWalletPromptModal.types';
|
|
3
|
-
export declare const SyncWalletPromptModal: ({ expectedAddress, connector, onResolve, }: SyncWalletPromptModalProps) => JSX.Element;
|
|
3
|
+
export declare const SyncWalletPromptModal: ({ expectedAddress, connector, onResolve, onReject, activeAddress, }: SyncWalletPromptModalProps) => JSX.Element;
|
|
@@ -76,13 +76,13 @@ import '../../views/TransactionConfirmationView/helpers/transactionErrorMessage.
|
|
|
76
76
|
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
77
77
|
import { SyncWalletView } from '../../views/SyncWalletView/SyncWalletView.js';
|
|
78
78
|
|
|
79
|
-
const SyncWalletPromptModal = ({ expectedAddress, connector, onResolve, }) => {
|
|
80
|
-
const { onSuccess, show, handleOnModalUnmount } = useConfirmationPortal({
|
|
79
|
+
const SyncWalletPromptModal = ({ expectedAddress, connector, onResolve, onReject, activeAddress, }) => {
|
|
80
|
+
const { onSuccess, onError, show, handleOnModalUnmount } = useConfirmationPortal({
|
|
81
81
|
defaultErrorMessage: 'User canceled',
|
|
82
|
-
onReject
|
|
82
|
+
onReject,
|
|
83
83
|
onResolve,
|
|
84
84
|
});
|
|
85
|
-
return (jsx(ConfirmationModal, { modalId: 'sync-wallet-modal', show: show, closeModal: () => { }, handleOnModalUnmount: handleOnModalUnmount, children: jsx(SyncWalletView, { onSuccess: onSuccess, expectedAddress: expectedAddress, connector: connector }) }));
|
|
85
|
+
return (jsx(ConfirmationModal, { modalId: 'sync-wallet-modal', show: show, closeModal: () => { }, handleOnModalUnmount: handleOnModalUnmount, children: jsx(SyncWalletView, { onSuccess: onSuccess, onError: onError, expectedAddress: expectedAddress, connector: connector, activeAddress: activeAddress }) }));
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
export { SyncWalletPromptModal };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var React = require('react');
|
|
7
|
+
|
|
8
|
+
function _interopNamespace(e) {
|
|
9
|
+
if (e && e.__esModule) return e;
|
|
10
|
+
var n = Object.create(null);
|
|
11
|
+
if (e) {
|
|
12
|
+
Object.keys(e).forEach(function (k) {
|
|
13
|
+
if (k !== 'default') {
|
|
14
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return e[k]; }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
n["default"] = e;
|
|
23
|
+
return Object.freeze(n);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
27
|
+
|
|
28
|
+
var _path;
|
|
29
|
+
var _excluded = ["title", "titleId"];
|
|
30
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
32
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
33
|
+
var SvgArrowCircleRight = function SvgArrowCircleRight(_ref) {
|
|
34
|
+
var title = _ref.title,
|
|
35
|
+
titleId = _ref.titleId,
|
|
36
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
37
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
38
|
+
width: 24,
|
|
39
|
+
height: 24,
|
|
40
|
+
viewBox: "0 0 24 24",
|
|
41
|
+
fill: "none",
|
|
42
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
43
|
+
"aria-labelledby": titleId
|
|
44
|
+
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
45
|
+
id: titleId
|
|
46
|
+
}, title) : null, _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
47
|
+
fillRule: "evenodd",
|
|
48
|
+
clipRule: "evenodd",
|
|
49
|
+
d: "M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16ZM2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm10.293-3.707a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1 0 1.414l-3 3a1 1 0 0 1-1.414-1.414L13.586 13H8a1 1 0 1 1 0-2h5.586l-1.293-1.293a1 1 0 0 1 0-1.414Z",
|
|
50
|
+
fill: "#ABACB2"
|
|
51
|
+
})));
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
exports.ReactComponent = SvgArrowCircleRight;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
var _path;
|
|
5
|
+
var _excluded = ["title", "titleId"];
|
|
6
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
7
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
8
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
9
|
+
var SvgArrowCircleRight = function SvgArrowCircleRight(_ref) {
|
|
10
|
+
var title = _ref.title,
|
|
11
|
+
titleId = _ref.titleId,
|
|
12
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
14
|
+
width: 24,
|
|
15
|
+
height: 24,
|
|
16
|
+
viewBox: "0 0 24 24",
|
|
17
|
+
fill: "none",
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
+
"aria-labelledby": titleId
|
|
20
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
21
|
+
id: titleId
|
|
22
|
+
}, title) : null, _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
23
|
+
fillRule: "evenodd",
|
|
24
|
+
clipRule: "evenodd",
|
|
25
|
+
d: "M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16ZM2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm10.293-3.707a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1 0 1.414l-3 3a1 1 0 0 1-1.414-1.414L13.586 13H8a1 1 0 1 1 0-2h5.586l-1.293-1.293a1 1 0 0 1 0-1.414Z",
|
|
26
|
+
fill: "#ABACB2"
|
|
27
|
+
})));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { SvgArrowCircleRight as ReactComponent };
|
|
@@ -96,3 +96,4 @@ export { ReactComponent as SettingsIcon } from './settings.svg';
|
|
|
96
96
|
export { ReactComponent as CurrencyIcon } from './currency.svg';
|
|
97
97
|
export { ReactComponent as AuthenticatorIcon } from './authenticator.svg';
|
|
98
98
|
export { ReactComponent as ShieldIcon } from './shield.svg';
|
|
99
|
+
export { ReactComponent as SecureActionIcon } from './secure-action.svg';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OauthProviderRequest, PasswordSourceTypeEnum, WalletAdditionalAddress, WalletProviderEnum } from '@dynamic-labs/sdk-api-core';
|
|
2
|
-
import type {
|
|
2
|
+
import type { InternalWalletConnector, Wallet } from '@dynamic-labs/wallet-connector-core';
|
|
3
3
|
export type { Wallet } from '@dynamic-labs/wallet-connector-core';
|
|
4
4
|
export type WalletAction = 'select' | 'unlink';
|
|
5
5
|
export type WalletWithAction = {
|
|
@@ -11,7 +11,7 @@ export interface WalletOption {
|
|
|
11
11
|
isInstalledOnBrowser: boolean;
|
|
12
12
|
key: string;
|
|
13
13
|
name: string;
|
|
14
|
-
walletConnector:
|
|
14
|
+
walletConnector: InternalWalletConnector;
|
|
15
15
|
group?: string;
|
|
16
16
|
chainGroup?: string;
|
|
17
17
|
walletGroup?: string;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
7
7
|
|
|
8
8
|
const usingSessionKey = (walletConnector) => walletConnectorCore.isSessionKeyCompatibleWalletConnector(walletConnector) ||
|
|
9
|
-
((walletConnector
|
|
9
|
+
(walletConnectorCore.isAccountAbstractionConnector(walletConnector) &&
|
|
10
10
|
walletConnectorCore.isSessionKeyCompatibleWalletConnector(walletConnector.getEOAConnector()));
|
|
11
11
|
|
|
12
12
|
exports.usingSessionKey = usingSessionKey;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import { isSessionKeyCompatibleWalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
2
|
+
import { isSessionKeyCompatibleWalletConnector, isAccountAbstractionConnector } from '@dynamic-labs/wallet-connector-core';
|
|
3
3
|
|
|
4
4
|
const usingSessionKey = (walletConnector) => isSessionKeyCompatibleWalletConnector(walletConnector) ||
|
|
5
|
-
((walletConnector
|
|
5
|
+
(isAccountAbstractionConnector(walletConnector) &&
|
|
6
6
|
isSessionKeyCompatibleWalletConnector(walletConnector.getEOAConnector()));
|
|
7
7
|
|
|
8
8
|
export { usingSessionKey };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
2
|
-
import type {
|
|
2
|
+
import type { InternalWalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
3
3
|
import { WalletOption } from '../../../types';
|
|
4
|
-
export declare const createWallet: (walletBook: WalletBookSchema, wallet:
|
|
4
|
+
export declare const createWallet: (walletBook: WalletBookSchema, wallet: InternalWalletConnector) => WalletOption;
|
|
@@ -103,7 +103,18 @@ const createNetwork = (network, parser = (input) => input) => ({
|
|
|
103
103
|
rpcUrls: network.rpcUrls,
|
|
104
104
|
vanityName: network.vanityName,
|
|
105
105
|
});
|
|
106
|
-
const
|
|
106
|
+
const overrideNetworks = (networkOverrides, networks) => {
|
|
107
|
+
if (!networkOverrides) {
|
|
108
|
+
return networks;
|
|
109
|
+
}
|
|
110
|
+
if (Array.isArray(networkOverrides)) {
|
|
111
|
+
return networkOverrides;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
return networkOverrides(networks !== null && networks !== void 0 ? networks : []);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
const useNetworkConfigurations = ({ environmentId, projectSettings, evmNetworksOverrides, cosmosNetworkOverrides, }) => {
|
|
107
118
|
const storedNetworks = useStoreWithSelector.useStoreWithSelector(store.getStore(), ({ networkConfigurations }) => networkConfigurations);
|
|
108
119
|
const { isLoading } = usePromise.usePromise(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
109
120
|
var _a, _b, _c, _d;
|
|
@@ -114,15 +125,19 @@ const useNetworkConfigurations = ({ environmentId, projectSettings, evmNetworksO
|
|
|
114
125
|
const solana = networks.find((configurations) => configurations.chainName === 'solana');
|
|
115
126
|
const cosmos = networks.find((configurations) => configurations.chainName === 'cosmos');
|
|
116
127
|
const starknet = networks.find((configurations) => configurations.chainName === 'starknet');
|
|
117
|
-
|
|
128
|
+
let cosmosNetworks = (_a = cosmos === null || cosmos === void 0 ? void 0 : cosmos.networks) === null || _a === void 0 ? void 0 : _a.map((net) => createNetwork(net, parseInt));
|
|
129
|
+
cosmosNetworks = overrideNetworks(cosmosNetworkOverrides, cosmosNetworks);
|
|
118
130
|
let evmNetworks = (_b = evm === null || evm === void 0 ? void 0 : evm.networks) === null || _b === void 0 ? void 0 : _b.map((net) => createNetwork(net, parseInt));
|
|
131
|
+
evmNetworks = overrideNetworks(evmNetworksOverrides, evmNetworks);
|
|
119
132
|
const starknetNetworks = (_c = starknet === null || starknet === void 0 ? void 0 : starknet.networks) === null || _c === void 0 ? void 0 : _c.map((net) => createNetwork(net));
|
|
120
133
|
const solanaNetworks = (_d = solana === null || solana === void 0 ? void 0 : solana.networks) === null || _d === void 0 ? void 0 : _d.map((net) => createNetwork(net));
|
|
121
134
|
if (evmNetworksOverrides) {
|
|
122
|
-
if (Array.isArray(evmNetworksOverrides))
|
|
135
|
+
if (Array.isArray(evmNetworksOverrides)) {
|
|
123
136
|
evmNetworks = evmNetworksOverrides;
|
|
124
|
-
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
125
139
|
evmNetworks = evmNetworksOverrides(evmNetworks !== null && evmNetworks !== void 0 ? evmNetworks : []);
|
|
140
|
+
}
|
|
126
141
|
}
|
|
127
142
|
return Promise.resolve({
|
|
128
143
|
cosmos: cosmosNetworks,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { ProjectSettings } from '@dynamic-labs/sdk-api-core';
|
|
2
2
|
import { NetworkConfigurationMap } from '@dynamic-labs/types';
|
|
3
|
-
import {
|
|
3
|
+
import { NetworksOverrides } from '../../../context/DynamicContext/types';
|
|
4
4
|
export type UseNetworkConfigurationsProps = {
|
|
5
5
|
environmentId: string;
|
|
6
6
|
projectSettings?: ProjectSettings;
|
|
7
|
-
evmNetworksOverrides?:
|
|
7
|
+
evmNetworksOverrides?: NetworksOverrides;
|
|
8
|
+
cosmosNetworkOverrides?: NetworksOverrides;
|
|
8
9
|
};
|
|
9
|
-
export declare const useNetworkConfigurations: ({ environmentId, projectSettings, evmNetworksOverrides, }: UseNetworkConfigurationsProps) => {
|
|
10
|
+
export declare const useNetworkConfigurations: ({ environmentId, projectSettings, evmNetworksOverrides, cosmosNetworkOverrides, }: UseNetworkConfigurationsProps) => {
|
|
10
11
|
isLoading: boolean;
|
|
11
12
|
networkConfigurations: NetworkConfigurationMap | undefined;
|
|
12
13
|
};
|
|
@@ -99,7 +99,18 @@ const createNetwork = (network, parser = (input) => input) => ({
|
|
|
99
99
|
rpcUrls: network.rpcUrls,
|
|
100
100
|
vanityName: network.vanityName,
|
|
101
101
|
});
|
|
102
|
-
const
|
|
102
|
+
const overrideNetworks = (networkOverrides, networks) => {
|
|
103
|
+
if (!networkOverrides) {
|
|
104
|
+
return networks;
|
|
105
|
+
}
|
|
106
|
+
if (Array.isArray(networkOverrides)) {
|
|
107
|
+
return networkOverrides;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
return networkOverrides(networks !== null && networks !== void 0 ? networks : []);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const useNetworkConfigurations = ({ environmentId, projectSettings, evmNetworksOverrides, cosmosNetworkOverrides, }) => {
|
|
103
114
|
const storedNetworks = useStoreWithSelector(getStore(), ({ networkConfigurations }) => networkConfigurations);
|
|
104
115
|
const { isLoading } = usePromise(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
105
116
|
var _a, _b, _c, _d;
|
|
@@ -110,15 +121,19 @@ const useNetworkConfigurations = ({ environmentId, projectSettings, evmNetworksO
|
|
|
110
121
|
const solana = networks.find((configurations) => configurations.chainName === 'solana');
|
|
111
122
|
const cosmos = networks.find((configurations) => configurations.chainName === 'cosmos');
|
|
112
123
|
const starknet = networks.find((configurations) => configurations.chainName === 'starknet');
|
|
113
|
-
|
|
124
|
+
let cosmosNetworks = (_a = cosmos === null || cosmos === void 0 ? void 0 : cosmos.networks) === null || _a === void 0 ? void 0 : _a.map((net) => createNetwork(net, parseInt));
|
|
125
|
+
cosmosNetworks = overrideNetworks(cosmosNetworkOverrides, cosmosNetworks);
|
|
114
126
|
let evmNetworks = (_b = evm === null || evm === void 0 ? void 0 : evm.networks) === null || _b === void 0 ? void 0 : _b.map((net) => createNetwork(net, parseInt));
|
|
127
|
+
evmNetworks = overrideNetworks(evmNetworksOverrides, evmNetworks);
|
|
115
128
|
const starknetNetworks = (_c = starknet === null || starknet === void 0 ? void 0 : starknet.networks) === null || _c === void 0 ? void 0 : _c.map((net) => createNetwork(net));
|
|
116
129
|
const solanaNetworks = (_d = solana === null || solana === void 0 ? void 0 : solana.networks) === null || _d === void 0 ? void 0 : _d.map((net) => createNetwork(net));
|
|
117
130
|
if (evmNetworksOverrides) {
|
|
118
|
-
if (Array.isArray(evmNetworksOverrides))
|
|
131
|
+
if (Array.isArray(evmNetworksOverrides)) {
|
|
119
132
|
evmNetworks = evmNetworksOverrides;
|
|
120
|
-
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
121
135
|
evmNetworks = evmNetworksOverrides(evmNetworks !== null && evmNetworks !== void 0 ? evmNetworks : []);
|
|
136
|
+
}
|
|
122
137
|
}
|
|
123
138
|
return Promise.resolve({
|
|
124
139
|
cosmos: cosmosNetworks,
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
require('@dynamic-labs/wallet-connector-core');
|
|
7
6
|
var createUserProfile = require('../../../utils/functions/createUserProfile/createUserProfile.cjs');
|
|
8
7
|
require('@dynamic-labs/sdk-api-core');
|
|
9
8
|
var values = require('../../../utils/constants/values.cjs');
|
|
@@ -12,6 +11,7 @@ require('../../../../../_virtual/_tslib.cjs');
|
|
|
12
11
|
require('@dynamic-labs/multi-wallet');
|
|
13
12
|
require('../../../shared/logger.cjs');
|
|
14
13
|
require('@dynamic-labs/iconic');
|
|
14
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
15
15
|
require('react/jsx-runtime');
|
|
16
16
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
17
17
|
require('react');
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import '@dynamic-labs/wallet-connector-core';
|
|
3
2
|
import { createUserProfileFromSdkUser } from '../../../utils/functions/createUserProfile/createUserProfile.js';
|
|
4
3
|
import '@dynamic-labs/sdk-api-core';
|
|
5
4
|
import { DYNAMIC_AUTH_COOKIE_NAME } from '../../../utils/constants/values.js';
|
|
@@ -8,6 +7,7 @@ import '../../../../../_virtual/_tslib.js';
|
|
|
8
7
|
import '@dynamic-labs/multi-wallet';
|
|
9
8
|
import '../../../shared/logger.js';
|
|
10
9
|
import '@dynamic-labs/iconic';
|
|
10
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
11
11
|
import 'react/jsx-runtime';
|
|
12
12
|
import '../../../context/ViewContext/ViewContext.js';
|
|
13
13
|
import 'react';
|