@dynamic-labs/sdk-react-core 4.61.1 → 4.61.3
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 +24 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +13 -13
- package/src/index.cjs +2 -0
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -0
- package/src/lib/Main.cjs +2 -1
- package/src/lib/Main.js +2 -1
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +1 -1
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +1 -1
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +1 -1
- package/src/lib/components/AnimatePresence/AnimatePresence.js +1 -1
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +1 -1
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +1 -1
- package/src/lib/components/Captcha/Captcha.cjs +1 -1
- package/src/lib/components/Captcha/Captcha.js +1 -1
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +1 -1
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +1 -1
- package/src/lib/components/LogoutButton/LogoutButton.cjs +1 -1
- package/src/lib/components/LogoutButton/LogoutButton.js +1 -1
- package/src/lib/components/Modal/Modal.cjs +1 -1
- package/src/lib/components/Modal/Modal.js +1 -1
- package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +1 -1
- package/src/lib/components/NeedHelpSection/NeedHelpSection.js +1 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +1 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.js +1 -1
- package/src/lib/components/OptionsSwitcher/OptionsSwitcher.cjs +1 -1
- package/src/lib/components/OptionsSwitcher/OptionsSwitcher.js +1 -1
- package/src/lib/components/OverlayCardBase/OverlayCardBase.cjs +1 -1
- package/src/lib/components/OverlayCardBase/OverlayCardBase.js +1 -1
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs +1 -1
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js +1 -1
- package/src/lib/components/QRCode/QRCode.cjs +1 -1
- package/src/lib/components/QRCode/QRCode.js +1 -1
- package/src/lib/components/RetrySendVerificationCodeSection/RetrySendVerificationCodeSection.cjs +1 -1
- package/src/lib/components/RetrySendVerificationCodeSection/RetrySendVerificationCodeSection.js +1 -1
- package/src/lib/components/SandboxIndicatorWrapper/SandboxIndicatorWrapper.cjs +1 -1
- package/src/lib/components/SandboxIndicatorWrapper/SandboxIndicatorWrapper.js +1 -1
- package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.cjs +1 -1
- package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.js +1 -1
- package/src/lib/components/Select/Select.cjs +1 -1
- package/src/lib/components/Select/Select.js +1 -1
- package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +1 -1
- package/src/lib/components/SendBalanceForm/SendBalanceForm.js +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +1 -1
- package/src/lib/components/ShadowDOM/ShadowDOM.cjs +1 -1
- package/src/lib/components/ShadowDOM/ShadowDOM.js +1 -1
- package/src/lib/components/SocialSignIn/SocialSignIn.cjs +1 -1
- package/src/lib/components/SocialSignIn/SocialSignIn.js +1 -1
- package/src/lib/components/SyncAuthFlow/SyncAuthFlow.cjs +1 -1
- package/src/lib/components/SyncAuthFlow/SyncAuthFlow.js +1 -1
- package/src/lib/components/Tooltip/Tooltip.cjs +1 -1
- package/src/lib/components/Tooltip/Tooltip.js +1 -1
- package/src/lib/components/TosAndPp/TosAndPp.cjs +1 -1
- package/src/lib/components/TosAndPp/TosAndPp.js +1 -1
- package/src/lib/components/TransactionCard/SendBalanceTransactionCard.cjs +1 -1
- package/src/lib/components/TransactionCard/SendBalanceTransactionCard.js +1 -1
- package/src/lib/components/TransactionCard/TransactionCard.cjs +1 -1
- package/src/lib/components/TransactionCard/TransactionCard.js +1 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +1 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +1 -1
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +1 -1
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +1 -1
- package/src/lib/components/UserAddress/UserAddress.cjs +1 -1
- package/src/lib/components/UserAddress/UserAddress.js +1 -1
- package/src/lib/components/UserProfile/parts/EditProfileButton/EditProfileButton.cjs +1 -1
- package/src/lib/components/UserProfile/parts/EditProfileButton/EditProfileButton.js +1 -1
- package/src/lib/components/UserProfileForm/UserProfileForm.cjs +1 -1
- package/src/lib/components/UserProfileForm/UserProfileForm.js +1 -1
- package/src/lib/components/WalletConnectorEvents/WalletConnectorEvents.cjs +1 -1
- package/src/lib/components/WalletConnectorEvents/WalletConnectorEvents.js +1 -1
- package/src/lib/context/CaptchaContext/CaptchaContext.cjs +1 -1
- package/src/lib/context/CaptchaContext/CaptchaContext.js +1 -1
- package/src/lib/context/ConnectWithOtpContext/ConnectWithOtpProvider.cjs +1 -1
- package/src/lib/context/ConnectWithOtpContext/ConnectWithOtpProvider.js +1 -1
- package/src/lib/context/DynamicContext/hooks/useAutoselectPrimaryWallet/useAutoselectPrimaryWallet.cjs +1 -1
- package/src/lib/context/DynamicContext/hooks/useAutoselectPrimaryWallet/useAutoselectPrimaryWallet.js +1 -1
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.cjs +1 -1
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.js +1 -1
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.cjs +1 -1
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.js +1 -1
- package/src/lib/context/DynamicContext/useDynamicContext/useOverrides/useOverrides.cjs +1 -1
- package/src/lib/context/DynamicContext/useDynamicContext/useOverrides/useOverrides.js +1 -1
- package/src/lib/context/LoadingContext/LoadingContext.cjs +1 -1
- package/src/lib/context/LoadingContext/LoadingContext.js +1 -1
- package/src/lib/context/MockContext/MockContext.cjs +1 -1
- package/src/lib/context/MockContext/MockContext.js +1 -1
- package/src/lib/context/PasskeyContext/PasskeyContext.cjs +1 -1
- package/src/lib/context/PasskeyContext/PasskeyContext.js +1 -1
- package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.cjs +1 -1
- package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.js +1 -1
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.cjs +1 -1
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.js +1 -1
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +1 -1
- package/src/lib/context/SendBalanceContext/SendBalanceContext.js +1 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +1 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +1 -1
- package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.cjs +1 -1
- package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.js +1 -1
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.cjs +1 -1
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.js +1 -1
- package/src/lib/context/ViewContext/types/index.d.ts +1 -1
- package/src/lib/events/embeddedWallet.d.ts +2 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +1 -1
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +1 -1
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +1 -1
- package/src/lib/store/state/nonce/nonce.cjs +1 -1
- package/src/lib/store/state/nonce/nonce.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/authViewLayoutChecks.cjs +2 -0
- package/src/lib/utils/constants/authViewLayoutChecks.js +2 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/useOtpVerificationRequest.cjs +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/useOtpVerificationRequest.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +1 -1
- package/src/lib/utils/hooks/index.d.ts +1 -0
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +1 -1
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +1 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAllowClose/useAllowClose.cjs +1 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAllowClose/useAllowClose.js +1 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +1 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +1 -1
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs +1 -1
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js +1 -1
- package/src/lib/utils/hooks/useConnectExchangeForFunding/useConnectExchangeForFunding.cjs +1 -1
- package/src/lib/utils/hooks/useConnectExchangeForFunding/useConnectExchangeForFunding.js +1 -1
- package/src/lib/utils/hooks/useConnectUnifiedForFunding/useConnectUnifiedForFunding.cjs +1 -1
- package/src/lib/utils/hooks/useConnectUnifiedForFunding/useConnectUnifiedForFunding.js +1 -1
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +1 -1
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +1 -1
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +1 -1
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +1 -1
- package/src/lib/utils/hooks/useDeleteUserAccount/useDeleteUserAccount.cjs +1 -1
- package/src/lib/utils/hooks/useDeleteUserAccount/useDeleteUserAccount.js +1 -1
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +1 -1
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +1 -1
- package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.cjs +1 -1
- package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.js +1 -1
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.cjs +1 -1
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.js +1 -1
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.cjs +3 -2
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.d.ts +2 -1
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.js +3 -2
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.cjs +1 -1
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.js +1 -1
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs +1 -1
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js +1 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +1 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +1 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.cjs +1 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.js +1 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.cjs +1 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.js +1 -1
- package/src/lib/utils/hooks/useEmbeddedWalletAuthenticator/useEmbeddedWalletAuthenticator.cjs +1 -1
- package/src/lib/utils/hooks/useEmbeddedWalletAuthenticator/useEmbeddedWalletAuthenticator.js +1 -1
- package/src/lib/utils/hooks/useExchangeAccounts/useExchangeAccounts.cjs +1 -1
- package/src/lib/utils/hooks/useExchangeAccounts/useExchangeAccounts.js +1 -1
- package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.cjs +1 -1
- package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.js +1 -1
- package/src/lib/utils/hooks/useFundWithWallet/useChooseLinkedWallet/useChooseLinkedWallet.cjs +1 -1
- package/src/lib/utils/hooks/useFundWithWallet/useChooseLinkedWallet/useChooseLinkedWallet.js +1 -1
- package/src/lib/utils/hooks/useFundWithWallet/useConnectWalletForFunding/useConnectWalletForFunding.cjs +1 -1
- package/src/lib/utils/hooks/useFundWithWallet/useConnectWalletForFunding/useConnectWalletForFunding.js +1 -1
- package/src/lib/utils/hooks/useFundWithWallet/useFund/useFund.cjs +1 -1
- package/src/lib/utils/hooks/useFundWithWallet/useFund/useFund.js +1 -1
- package/src/lib/utils/hooks/useFundWithWallet/useFundWithWallet.cjs +1 -1
- package/src/lib/utils/hooks/useFundWithWallet/useFundWithWallet.js +1 -1
- package/src/lib/utils/hooks/useFundingExchangeHelpers/useFundingExchangeHelpers.cjs +1 -1
- package/src/lib/utils/hooks/useFundingExchangeHelpers/useFundingExchangeHelpers.js +1 -1
- package/src/lib/utils/hooks/useGetWalletPassword/useGetWalletPassword.cjs +1 -1
- package/src/lib/utils/hooks/useGetWalletPassword/useGetWalletPassword.js +1 -1
- package/src/lib/utils/hooks/useHandleAuthenticatedUser/useHandleAuthenticatedUser.cjs +1 -1
- package/src/lib/utils/hooks/useHandleAuthenticatedUser/useHandleAuthenticatedUser.js +1 -1
- package/src/lib/utils/hooks/useHandleVerificationRequired/useHandleVerificationRequired.cjs +1 -1
- package/src/lib/utils/hooks/useHandleVerificationRequired/useHandleVerificationRequired.js +1 -1
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +1 -1
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +1 -1
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.cjs +1 -1
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.js +1 -1
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.cjs +1 -1
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.js +1 -1
- package/src/lib/utils/hooks/useIsPasswordEncrypted/index.d.ts +1 -0
- package/src/lib/utils/hooks/useIsPasswordEncrypted/useIsPasswordEncrypted.cjs +132 -0
- package/src/lib/utils/hooks/useIsPasswordEncrypted/useIsPasswordEncrypted.d.ts +1 -0
- package/src/lib/utils/hooks/useIsPasswordEncrypted/useIsPasswordEncrypted.js +128 -0
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs +1 -1
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js +1 -1
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +1 -1
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +1 -1
- package/src/lib/utils/hooks/useMergeUserAccounts/useMergeUserAccounts.cjs +1 -1
- package/src/lib/utils/hooks/useMergeUserAccounts/useMergeUserAccounts.js +1 -1
- package/src/lib/utils/hooks/useMfaModals/useMfaModals.cjs +1 -1
- package/src/lib/utils/hooks/useMfaModals/useMfaModals.js +1 -1
- package/src/lib/utils/hooks/useNetworkNotSupported/useNetworkNotSupported.cjs +1 -1
- package/src/lib/utils/hooks/useNetworkNotSupported/useNetworkNotSupported.js +1 -1
- package/src/lib/utils/hooks/useOnramp/useOnramp.cjs +1 -1
- package/src/lib/utils/hooks/useOnramp/useOnramp.js +1 -1
- package/src/lib/utils/hooks/useOpenFundingOptions/useOpenFundingOptions.cjs +1 -1
- package/src/lib/utils/hooks/useOpenFundingOptions/useOpenFundingOptions.js +1 -1
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +1 -1
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +1 -1
- package/src/lib/utils/hooks/usePayWithDynamic/usePayWithDynamic.cjs +1 -1
- package/src/lib/utils/hooks/usePayWithDynamic/usePayWithDynamic.js +1 -1
- package/src/lib/utils/hooks/usePromptAndFundWithExchange/usePromptAndFundWithExchange.cjs +1 -1
- package/src/lib/utils/hooks/usePromptAndFundWithExchange/usePromptAndFundWithExchange.js +1 -1
- package/src/lib/utils/hooks/usePromptMfaAuth/usePromptMfaAuth.cjs +1 -1
- package/src/lib/utils/hooks/usePromptMfaAuth/usePromptMfaAuth.js +1 -1
- package/src/lib/utils/hooks/usePromptWalletUnlock/usePromptWalletUnlock.cjs +1 -1
- package/src/lib/utils/hooks/usePromptWalletUnlock/usePromptWalletUnlock.js +1 -1
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.cjs +1 -1
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.js +1 -1
- package/src/lib/utils/hooks/useSessionKeys/useSessionKeys.cjs +1 -1
- package/src/lib/utils/hooks/useSessionKeys/useSessionKeys.js +1 -1
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.cjs +1 -1
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.js +1 -1
- package/src/lib/utils/hooks/useSetupPassword/useSetupPassword.cjs +30 -16
- package/src/lib/utils/hooks/useSetupPassword/useSetupPassword.js +30 -16
- package/src/lib/utils/hooks/useSignInWithPasskey/useSignInWithPasskey.cjs +1 -1
- package/src/lib/utils/hooks/useSignInWithPasskey/useSignInWithPasskey.js +1 -1
- package/src/lib/utils/hooks/useSmartWallets/useSmartWallets.cjs +1 -1
- package/src/lib/utils/hooks/useSmartWallets/useSmartWallets.js +1 -1
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +1 -1
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +1 -1
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +1 -1
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +1 -1
- package/src/lib/utils/hooks/useSwitchWallet/useSwitchWallet.cjs +1 -1
- package/src/lib/utils/hooks/useSwitchWallet/useSwitchWallet.js +1 -1
- package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.cjs +1 -1
- package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.js +1 -1
- package/src/lib/utils/hooks/useSyncEmbeddedWalletFlow/useSyncEmbeddedWalletFlow.cjs +1 -1
- package/src/lib/utils/hooks/useSyncEmbeddedWalletFlow/useSyncEmbeddedWalletFlow.js +1 -1
- package/src/lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.cjs +1 -1
- package/src/lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.js +1 -1
- package/src/lib/utils/hooks/useSyncOnboardingFlow/useSyncOnboardingFlow.cjs +1 -1
- package/src/lib/utils/hooks/useSyncOnboardingFlow/useSyncOnboardingFlow.js +1 -1
- package/src/lib/utils/hooks/useTelegramLogin/useTelegramLogin.cjs +1 -1
- package/src/lib/utils/hooks/useTelegramLogin/useTelegramLogin.js +1 -1
- package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.cjs +1 -1
- package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.js +1 -1
- package/src/lib/utils/hooks/useTransactionSimulation/classes/useBaseTransactionSimulation.cjs +1 -1
- package/src/lib/utils/hooks/useTransactionSimulation/classes/useBaseTransactionSimulation.js +1 -1
- package/src/lib/utils/hooks/useTransferWallet/useTransferWallet.cjs +1 -1
- package/src/lib/utils/hooks/useTransferWallet/useTransferWallet.js +1 -1
- package/src/lib/utils/hooks/useUpgradeEmbeddedWallet/useUpgradeEmbeddedWallet.cjs +1 -1
- package/src/lib/utils/hooks/useUpgradeEmbeddedWallet/useUpgradeEmbeddedWallet.js +1 -1
- package/src/lib/utils/hooks/useUpgradeToDynamicWaasFlow/useUpgradeToDynamicWaasFlow.cjs +1 -1
- package/src/lib/utils/hooks/useUpgradeToDynamicWaasFlow/useUpgradeToDynamicWaasFlow.js +1 -1
- package/src/lib/utils/hooks/useUserAuth/useUserAuth.cjs +1 -1
- package/src/lib/utils/hooks/useUserAuth/useUserAuth.js +1 -1
- package/src/lib/utils/hooks/useUserUpdateRequest/unlinkUserEmail/unlinkUserEmail.cjs +1 -1
- package/src/lib/utils/hooks/useUserUpdateRequest/unlinkUserEmail/unlinkUserEmail.js +1 -1
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs +1 -1
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js +1 -1
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +1 -1
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +1 -1
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +1 -1
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +1 -1
- package/src/lib/utils/hooks/useViewSettings/useViewSettings.cjs +1 -1
- package/src/lib/utils/hooks/useViewSettings/useViewSettings.js +1 -1
- package/src/lib/utils/hooks/useWalletBackup/useWalletBackup.cjs +1 -1
- package/src/lib/utils/hooks/useWalletBackup/useWalletBackup.js +1 -1
- package/src/lib/utils/hooks/useWalletDelegation/useWalletDelegation.cjs +17 -21
- package/src/lib/utils/hooks/useWalletDelegation/useWalletDelegation.d.ts +2 -2
- package/src/lib/utils/hooks/useWalletDelegation/useWalletDelegation.js +17 -21
- package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.cjs +1 -1
- package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.js +1 -1
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +1 -1
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +1 -1
- package/src/lib/utils/hooks/useWalletList/useWalletList.cjs +1 -1
- package/src/lib/utils/hooks/useWalletList/useWalletList.js +1 -1
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.cjs +1 -1
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.js +1 -1
- package/src/lib/views/AccountUpgradedView/AccountUpgradedView.cjs +1 -1
- package/src/lib/views/AccountUpgradedView/AccountUpgradedView.js +1 -1
- package/src/lib/views/AddNetworkView/AddNetworkView.cjs +1 -1
- package/src/lib/views/AddNetworkView/AddNetworkView.js +1 -1
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +1 -1
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +1 -1
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +1 -1
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +1 -1
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +1 -1
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +1 -1
- package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.cjs +2 -2
- package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.js +3 -3
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +1 -1
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +1 -1
- package/src/lib/views/ExportSharesView/ExportSharesView.cjs +1 -1
- package/src/lib/views/ExportSharesView/ExportSharesView.js +1 -1
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.cjs +1 -1
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.js +1 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +1 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +1 -1
- package/src/lib/views/LoginView/useLoginView/useLoginView.cjs +1 -1
- package/src/lib/views/LoginView/useLoginView/useLoginView.js +1 -1
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +1 -1
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +1 -1
- package/src/lib/views/MobileWalletRedirectView/MobileWalletRedirectView.cjs +1 -1
- package/src/lib/views/MobileWalletRedirectView/MobileWalletRedirectView.js +1 -1
- package/src/lib/views/NoAccess/useNoAccessText.cjs +1 -1
- package/src/lib/views/NoAccess/useNoAccessText.js +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.cjs +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.js +1 -1
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +1 -1
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.cjs +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.js +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.cjs +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.js +1 -1
- package/src/lib/views/QrCodeView/QrCodeView.cjs +1 -1
- package/src/lib/views/QrCodeView/QrCodeView.js +1 -1
- package/src/lib/views/ResetPasswordForSettingsView/ResetPasswordForSettingsView.cjs +134 -0
- package/src/lib/views/ResetPasswordForSettingsView/ResetPasswordForSettingsView.d.ts +2 -0
- package/src/lib/views/ResetPasswordForSettingsView/ResetPasswordForSettingsView.js +130 -0
- package/src/lib/views/ResetPasswordForSettingsView/index.d.ts +1 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -1
- package/src/lib/views/SetupPasswordForWalletCreationView/SetupPasswordForWalletCreationView.cjs +123 -0
- package/src/lib/views/SetupPasswordForWalletCreationView/SetupPasswordForWalletCreationView.d.ts +2 -0
- package/src/lib/views/SetupPasswordForWalletCreationView/SetupPasswordForWalletCreationView.js +119 -0
- package/src/lib/views/SetupPasswordForWalletCreationView/index.d.ts +1 -0
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.cjs +1 -1
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.js +1 -1
- package/src/lib/views/SyncWalletView/SyncWalletView.cjs +1 -1
- package/src/lib/views/SyncWalletView/SyncWalletView.js +1 -1
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +1 -1
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +1 -1
- package/src/lib/views/UnlockWalletView/UnlockWalletView.cjs +1 -1
- package/src/lib/views/UnlockWalletView/UnlockWalletView.js +1 -1
- package/src/lib/views/UserDeleteAccountView/UserDeleteAccountView.cjs +1 -1
- package/src/lib/views/UserDeleteAccountView/UserDeleteAccountView.js +1 -1
- package/src/lib/views/UserFieldEditorView/useAssignDefaultValues/useAssignDefaultValues.cjs +1 -1
- package/src/lib/views/UserFieldEditorView/useAssignDefaultValues/useAssignDefaultValues.js +1 -1
- package/src/lib/views/WalletList/WalletList.cjs +1 -1
- package/src/lib/views/WalletList/WalletList.js +1 -1
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +1 -1
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +1 -1
- package/src/lib/views/WalletUpgradeFlowView/WalletUpgradeFlowView.cjs +1 -1
- package/src/lib/views/WalletUpgradeFlowView/WalletUpgradeFlowView.js +1 -1
- package/src/lib/views/index.d.ts +1 -0
- package/src/lib/views/viewToComponentMap.cjs +4 -0
- package/src/lib/views/viewToComponentMap.d.ts +2 -0
- package/src/lib/views/viewToComponentMap.js +4 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.js +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js +1 -1
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.cjs +1 -1
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.js +1 -1
- package/src/lib/widgets/DynamicMultiWalletPromptsWidget/DynamicMultiWalletPromptsWidget.cjs +1 -1
- package/src/lib/widgets/DynamicMultiWalletPromptsWidget/DynamicMultiWalletPromptsWidget.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/ActiveWalletBalance.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/ActiveWalletBalance.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.js +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.js +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.js +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useMultiWalletPromptState/useMultiWalletPromptState.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useMultiWalletPromptState/useMultiWalletPromptState.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/AwaitingConnectionModal/AwaitingConnectionModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/AwaitingConnectionModal/AwaitingConnectionModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/EmbeddedWalletExportSection/EmbeddedWalletExportSection.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/EmbeddedWalletExportSection/EmbeddedWalletExportSection.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/MfaSection.cjs +20 -6
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/MfaSection.js +20 -6
- package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useStartExchangeFunding/useStartExchangeFunding.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useStartExchangeFunding/useStartExchangeFunding.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/DepositView/DepositView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/DepositView/DepositView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ExportAndRecoveryView/ExportAndRecoveryView.cjs +17 -34
- package/src/lib/widgets/DynamicWidget/views/ExportAndRecoveryView/ExportAndRecoveryView.js +18 -35
- package/src/lib/widgets/DynamicWidget/views/ExportSharesPasscodeView/ExportSharesPasscodeView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ExportSharesPasscodeView/ExportSharesPasscodeView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ReceiveWalletFunds/utils/useExchangeTokensForFunding/useExchangeTokensForFunding.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ReceiveWalletFunds/utils/useExchangeTokensForFunding/useExchangeTokensForFunding.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ReceiveWalletFunds/utils/useTokensForFunding/useTokensForFunding.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ReceiveWalletFunds/utils/useTokensForFunding/useTokensForFunding.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ResetPasswordCurrentView/ResetPasswordCurrentView.cjs +50 -0
- package/src/lib/widgets/DynamicWidget/views/ResetPasswordCurrentView/ResetPasswordCurrentView.d.ts +8 -0
- package/src/lib/widgets/DynamicWidget/views/ResetPasswordCurrentView/ResetPasswordCurrentView.js +46 -0
- package/src/lib/widgets/DynamicWidget/views/ResetPasswordCurrentView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/ResetPasswordView/ResetPasswordView.cjs +182 -0
- package/src/lib/widgets/DynamicWidget/views/ResetPasswordView/ResetPasswordView.d.ts +5 -0
- package/src/lib/widgets/DynamicWidget/views/ResetPasswordView/ResetPasswordView.js +178 -0
- package/src/lib/widgets/DynamicWidget/views/ResetPasswordView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/SetupPasswordConfirmView/SetupPasswordConfirmView.cjs +11 -4
- package/src/lib/widgets/DynamicWidget/views/SetupPasswordConfirmView/SetupPasswordConfirmView.d.ts +3 -0
- package/src/lib/widgets/DynamicWidget/views/SetupPasswordConfirmView/SetupPasswordConfirmView.js +11 -4
- package/src/lib/widgets/DynamicWidget/views/SetupPasswordEnterView/SetupPasswordEnterView.cjs +16 -9
- package/src/lib/widgets/DynamicWidget/views/SetupPasswordEnterView/SetupPasswordEnterView.d.ts +3 -0
- package/src/lib/widgets/DynamicWidget/views/SetupPasswordEnterView/SetupPasswordEnterView.js +16 -9
- package/src/lib/widgets/DynamicWidget/views/SetupPasswordSuccessView/SetupPasswordSuccessView.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/views/SetupPasswordSuccessView/SetupPasswordSuccessView.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/SetupPasswordSuccessView/SetupPasswordSuccessView.js +2 -2
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupSuccessView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupSuccessView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupView.js +1 -1
package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/MfaSection.js
CHANGED
|
@@ -13,7 +13,7 @@ import '@dynamic-labs/wallet-connector-core';
|
|
|
13
13
|
import { ReactComponent as SvgChevronLeft } from '../../../../../shared/assets/chevron-left.js';
|
|
14
14
|
import { ReactComponent as SvgFaceId } from '../../../../../shared/assets/face-id.js';
|
|
15
15
|
import { ReactComponent as SvgLock } from '../../../../../shared/assets/lock.js';
|
|
16
|
-
import '../../../../../context/ViewContext/ViewContext.js';
|
|
16
|
+
import { useViewContext } from '../../../../../context/ViewContext/ViewContext.js';
|
|
17
17
|
import { logger } from '../../../../../shared/logger.js';
|
|
18
18
|
import '@dynamic-labs/wallet-book';
|
|
19
19
|
import '@dynamic-labs/utils';
|
|
@@ -80,6 +80,7 @@ import 'qrcode';
|
|
|
80
80
|
import 'formik';
|
|
81
81
|
import '../../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
82
82
|
import '../../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
83
|
+
import { useWidgetContext } from '../../../context/DynamicWidgetContext.js';
|
|
83
84
|
import '../../../../../utils/hooks/useWalletBackup/useWalletBackup.js';
|
|
84
85
|
import '../../../../../utils/hooks/useWalletBackup/types.js';
|
|
85
86
|
import '../../../../../utils/hooks/useWalletBackup/cloudProviders.js';
|
|
@@ -87,13 +88,13 @@ import '../../../../../context/IpConfigurationContext/IpConfigurationContext.js'
|
|
|
87
88
|
import '../../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
88
89
|
import '../../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
89
90
|
import '@hcaptcha/react-hcaptcha';
|
|
90
|
-
import { useWidgetContext } from '../../../context/DynamicWidgetContext.js';
|
|
91
91
|
import '../../../helpers/convertExchangeKeyAndProviderEnum.js';
|
|
92
92
|
import '../../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.js';
|
|
93
93
|
import '../../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
94
94
|
import '../../../../../context/FooterAnimationContext/index.js';
|
|
95
95
|
import '../../../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.js';
|
|
96
96
|
import '../../../../../context/PasskeyContext/PasskeyContext.js';
|
|
97
|
+
import { useWalletPassword } from '../../../../../utils/hooks/useWalletPassword/useWalletPassword.js';
|
|
97
98
|
import '../../../../../context/OnrampContext/OnrampContext.js';
|
|
98
99
|
import '../../../../../store/state/sendBalances.js';
|
|
99
100
|
import '../../../../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
@@ -101,6 +102,7 @@ import '../../../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardT
|
|
|
101
102
|
import '../../../components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
102
103
|
import '../../../../../views/TransactionConfirmationView/TransactionConfirmationView.js';
|
|
103
104
|
import '../../../components/PasskeyCard/PasskeyCard.js';
|
|
105
|
+
import { useIsPasswordEncrypted } from '../../../../../utils/hooks/useIsPasswordEncrypted/useIsPasswordEncrypted.js';
|
|
104
106
|
import '../../CryptoComOnramp/CryptoComOnramp.js';
|
|
105
107
|
import '../../../../../../index.js';
|
|
106
108
|
import '../../ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
@@ -110,17 +112,18 @@ import '../../../../../store/state/tokenBalances.js';
|
|
|
110
112
|
import '../../../../../store/state/multichainBalances.js';
|
|
111
113
|
import '../../../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
112
114
|
import { useIsPasskeysMfaEnabled } from '../../../../../utils/hooks/useIsPasskeysMfaEnabled/useIsPasskeysMfaEnabled.js';
|
|
113
|
-
import { useWalletPassword } from '../../../../../utils/hooks/useWalletPassword/useWalletPassword.js';
|
|
114
115
|
import { useInternalDynamicContext } from '../../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.js';
|
|
115
116
|
|
|
116
117
|
const MfaSection = ({ isLoading }) => {
|
|
117
118
|
var _a, _b, _c;
|
|
118
119
|
const { t } = useTranslation();
|
|
119
120
|
const { setDynamicWidgetView } = useWidgetContext();
|
|
120
|
-
const { primaryWallet } = useInternalDynamicContext();
|
|
121
|
+
const { primaryWallet, setShowAuthFlow } = useInternalDynamicContext();
|
|
122
|
+
const { pushView } = useViewContext();
|
|
121
123
|
const { getEOAWallet } = useSmartWallets();
|
|
122
124
|
const projectSettings = useProjectSettings();
|
|
123
125
|
const { updatePassword } = useWalletPassword();
|
|
126
|
+
const isPasswordEncrypted = useIsPasswordEncrypted();
|
|
124
127
|
const isMfaEnabled = useIsMfaEnabled();
|
|
125
128
|
const isTotpMfaEnabled = useIsTotpMfaEnabled();
|
|
126
129
|
const isPasskeyMfaEnabled = useIsPasskeysMfaEnabled();
|
|
@@ -147,14 +150,25 @@ const MfaSection = ({ isLoading }) => {
|
|
|
147
150
|
}),
|
|
148
151
|
});
|
|
149
152
|
}, [setDynamicWidgetView, wallet, updatePassword]);
|
|
153
|
+
const handleResetPasswordClick = useCallback(() => {
|
|
154
|
+
setShowAuthFlow(true, {
|
|
155
|
+
ignoreIfIsEmbeddedWidget: false,
|
|
156
|
+
performMultiWalletChecks: false,
|
|
157
|
+
});
|
|
158
|
+
pushView('reset-password-flow');
|
|
159
|
+
}, [setShowAuthFlow, pushView]);
|
|
150
160
|
if (!isMfaEnabled && !isWaasWallet) {
|
|
151
161
|
return null;
|
|
152
162
|
}
|
|
153
163
|
return (jsxs("div", { className: 'settings-view__body__section', children: [jsx("div", { className: 'settings-view__body__section__title', children: jsx(Typography, { copykey: 'dyn_settings.mfa_section.title', color: 'secondary', weight: 'medium', children: t('dyn_settings.mfa_section.title') }) }), isPasskeyMfaEnabled && (jsx(TypographyButton, { dataTestId: 'manage-passkeys-mfa-button', onClick: handlePasskeyMfaClick, buttonClassName: 'settings-view__body__section__button', startSlot:
|
|
154
164
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
155
|
-
jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgFaceId, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.mfa_section.passkey_button', children: t('dyn_settings.mfa_section.passkey_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false })), shouldShowPasswordSetup && (jsx(TypographyButton, { dataTestId: 'password-setup-button', onClick: handlePasscodeClick, buttonClassName: 'settings-view__body__section__button', startSlot:
|
|
165
|
+
jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgFaceId, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.mfa_section.passkey_button', children: t('dyn_settings.mfa_section.passkey_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false })), shouldShowPasswordSetup && (jsx(TypographyButton, { dataTestId: 'password-setup-button', onClick: isPasswordEncrypted ? handleResetPasswordClick : handlePasscodeClick, buttonClassName: 'settings-view__body__section__button', startSlot:
|
|
156
166
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
157
|
-
jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgLock, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey:
|
|
167
|
+
jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgLock, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: isPasswordEncrypted
|
|
168
|
+
? 'dyn_settings.account_security.password.reset_button'
|
|
169
|
+
: 'dyn_settings.account_security.password.set_button', children: isPasswordEncrypted
|
|
170
|
+
? t('dyn_settings.account_security.password.reset_button')
|
|
171
|
+
: t('dyn_settings.account_security.password.set_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false })), isTotpMfaEnabled && (jsx(TypographyButton, { dataTestId: 'manage-totp-mfa-button', onClick: handleTotpMfaClick, buttonClassName: 'settings-view__body__section__button', startSlot:
|
|
158
172
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
159
173
|
jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgLock, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.mfa_section.totp_button', children: t('dyn_settings.mfa_section.totp_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false }))] }));
|
|
160
174
|
};
|
|
@@ -77,6 +77,7 @@ require('qrcode');
|
|
|
77
77
|
require('formik');
|
|
78
78
|
require('../../../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
|
|
79
79
|
require('../../../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
80
|
+
require('../../../../context/DynamicWidgetContext.cjs');
|
|
80
81
|
require('../../../../../../utils/hooks/useWalletBackup/useWalletBackup.cjs');
|
|
81
82
|
require('../../../../../../utils/hooks/useWalletBackup/types.cjs');
|
|
82
83
|
require('../../../../../../utils/hooks/useWalletBackup/cloudProviders.cjs');
|
|
@@ -86,7 +87,6 @@ require('../../../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.c
|
|
|
86
87
|
require('../../../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
87
88
|
require('@hcaptcha/react-hcaptcha');
|
|
88
89
|
require('../../../../../../context/LoadingContext/LoadingContext.cjs');
|
|
89
|
-
require('../../../../context/DynamicWidgetContext.cjs');
|
|
90
90
|
require('../../../../helpers/convertExchangeKeyAndProviderEnum.cjs');
|
|
91
91
|
require('../../../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.cjs');
|
|
92
92
|
require('../../../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
@@ -73,6 +73,7 @@ import 'qrcode';
|
|
|
73
73
|
import 'formik';
|
|
74
74
|
import '../../../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
75
75
|
import '../../../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
76
|
+
import '../../../../context/DynamicWidgetContext.js';
|
|
76
77
|
import '../../../../../../utils/hooks/useWalletBackup/useWalletBackup.js';
|
|
77
78
|
import '../../../../../../utils/hooks/useWalletBackup/types.js';
|
|
78
79
|
import '../../../../../../utils/hooks/useWalletBackup/cloudProviders.js';
|
|
@@ -82,7 +83,6 @@ import '../../../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js
|
|
|
82
83
|
import '../../../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
83
84
|
import '@hcaptcha/react-hcaptcha';
|
|
84
85
|
import '../../../../../../context/LoadingContext/LoadingContext.js';
|
|
85
|
-
import '../../../../context/DynamicWidgetContext.js';
|
|
86
86
|
import '../../../../helpers/convertExchangeKeyAndProviderEnum.js';
|
|
87
87
|
import '../../../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.js';
|
|
88
88
|
import '../../../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
@@ -84,6 +84,7 @@ var shortenWalletAddress = require('../../../../shared/utils/functions/shortenWa
|
|
|
84
84
|
require('formik');
|
|
85
85
|
require('../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
|
|
86
86
|
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
87
|
+
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
87
88
|
require('../../../../utils/hooks/useWalletBackup/useWalletBackup.cjs');
|
|
88
89
|
require('../../../../utils/hooks/useWalletBackup/types.cjs');
|
|
89
90
|
require('../../../../utils/hooks/useWalletBackup/cloudProviders.cjs');
|
|
@@ -91,7 +92,6 @@ require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs')
|
|
|
91
92
|
require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
92
93
|
require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
93
94
|
require('@hcaptcha/react-hcaptcha');
|
|
94
|
-
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
95
95
|
require('../../helpers/convertExchangeKeyAndProviderEnum.cjs');
|
|
96
96
|
require('../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.cjs');
|
|
97
97
|
require('../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
@@ -80,6 +80,7 @@ import { shortenWalletAddress } from '../../../../shared/utils/functions/shorten
|
|
|
80
80
|
import 'formik';
|
|
81
81
|
import '../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
82
82
|
import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
83
|
+
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
83
84
|
import '../../../../utils/hooks/useWalletBackup/useWalletBackup.js';
|
|
84
85
|
import '../../../../utils/hooks/useWalletBackup/types.js';
|
|
85
86
|
import '../../../../utils/hooks/useWalletBackup/cloudProviders.js';
|
|
@@ -87,7 +88,6 @@ import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
|
87
88
|
import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
88
89
|
import '../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
89
90
|
import '@hcaptcha/react-hcaptcha';
|
|
90
|
-
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
91
91
|
import '../../helpers/convertExchangeKeyAndProviderEnum.js';
|
|
92
92
|
import '../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.js';
|
|
93
93
|
import '../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
@@ -86,6 +86,7 @@ var shortenWalletAddress = require('../../../../shared/utils/functions/shortenWa
|
|
|
86
86
|
require('formik');
|
|
87
87
|
require('../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
|
|
88
88
|
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
89
|
+
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
89
90
|
require('../../../../utils/hooks/useWalletBackup/useWalletBackup.cjs');
|
|
90
91
|
require('../../../../utils/hooks/useWalletBackup/types.cjs');
|
|
91
92
|
require('../../../../utils/hooks/useWalletBackup/cloudProviders.cjs');
|
|
@@ -93,7 +94,6 @@ require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs')
|
|
|
93
94
|
require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
94
95
|
require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
95
96
|
require('@hcaptcha/react-hcaptcha');
|
|
96
|
-
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
97
97
|
require('../../helpers/convertExchangeKeyAndProviderEnum.cjs');
|
|
98
98
|
require('../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.cjs');
|
|
99
99
|
require('../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
@@ -82,6 +82,7 @@ import { shortenWalletAddress } from '../../../../shared/utils/functions/shorten
|
|
|
82
82
|
import 'formik';
|
|
83
83
|
import '../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
84
84
|
import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
85
|
+
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
85
86
|
import '../../../../utils/hooks/useWalletBackup/useWalletBackup.js';
|
|
86
87
|
import '../../../../utils/hooks/useWalletBackup/types.js';
|
|
87
88
|
import '../../../../utils/hooks/useWalletBackup/cloudProviders.js';
|
|
@@ -89,7 +90,6 @@ import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
|
89
90
|
import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
90
91
|
import '../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
91
92
|
import '@hcaptcha/react-hcaptcha';
|
|
92
|
-
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
93
93
|
import '../../helpers/convertExchangeKeyAndProviderEnum.js';
|
|
94
94
|
import '../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.js';
|
|
95
95
|
import '../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
@@ -8,11 +8,12 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
8
8
|
var React = require('react');
|
|
9
9
|
var reactI18next = require('react-i18next');
|
|
10
10
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
11
|
-
require('
|
|
12
|
-
require('
|
|
13
|
-
require('../../../../
|
|
14
|
-
require('
|
|
15
|
-
require('../../../../
|
|
11
|
+
var IconButton = require('../../../../components/IconButton/IconButton.cjs');
|
|
12
|
+
var ModalHeader = require('../../../../components/ModalHeader/ModalHeader.cjs');
|
|
13
|
+
var Typography = require('../../../../components/Typography/Typography.cjs');
|
|
14
|
+
var TypographyButton = require('../../../../components/TypographyButton/TypographyButton.cjs');
|
|
15
|
+
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
16
|
+
require('../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
|
|
16
17
|
require('@dynamic-labs/iconic');
|
|
17
18
|
var chevronLeft = require('../../../../shared/assets/chevron-left.cjs');
|
|
18
19
|
var exportPrivateKey = require('../../../../shared/assets/export-private-key.cjs');
|
|
@@ -23,25 +24,23 @@ require('@dynamic-labs/wallet-book');
|
|
|
23
24
|
require('@dynamic-labs/utils');
|
|
24
25
|
require('../../../../utils/constants/colors.cjs');
|
|
25
26
|
require('../../../../utils/constants/values.cjs');
|
|
27
|
+
require('@dynamic-labs/sdk-api-core');
|
|
26
28
|
require('../../../../shared/consts/index.cjs');
|
|
29
|
+
require('../../../../events/dynamicEvents.cjs');
|
|
30
|
+
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
31
|
+
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
27
32
|
require('@dynamic-labs/multi-wallet');
|
|
28
33
|
require('react-international-phone');
|
|
29
34
|
require('../../../../store/state/nonce/nonce.cjs');
|
|
35
|
+
require('@dynamic-labs-sdk/client/core');
|
|
36
|
+
require('../../../../client/client.cjs');
|
|
37
|
+
require('@dynamic-labs-sdk/client');
|
|
38
|
+
require('../../../../config/ApiEndpoint.cjs');
|
|
30
39
|
require('@dynamic-labs/locale');
|
|
31
40
|
require('../../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
32
41
|
require('../../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
33
42
|
require('../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
34
43
|
require('../../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.cjs');
|
|
35
|
-
require('../../../../events/dynamicEvents.cjs');
|
|
36
|
-
var useUser = require('../../../../client/extension/user/useUser/useUser.cjs');
|
|
37
|
-
var IconButton = require('../../../../components/IconButton/IconButton.cjs');
|
|
38
|
-
var ModalHeader = require('../../../../components/ModalHeader/ModalHeader.cjs');
|
|
39
|
-
var Typography = require('../../../../components/Typography/Typography.cjs');
|
|
40
|
-
var TypographyButton = require('../../../../components/TypographyButton/TypographyButton.cjs');
|
|
41
|
-
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
42
|
-
require('../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
|
|
43
|
-
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
44
|
-
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
45
44
|
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
46
45
|
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
47
46
|
require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
@@ -86,6 +85,7 @@ require('qrcode');
|
|
|
86
85
|
require('formik');
|
|
87
86
|
require('../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
|
|
88
87
|
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
88
|
+
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
89
89
|
require('../../../../utils/hooks/useWalletBackup/useWalletBackup.cjs');
|
|
90
90
|
require('../../../../utils/hooks/useWalletBackup/types.cjs');
|
|
91
91
|
require('../../../../utils/hooks/useWalletBackup/cloudProviders.cjs');
|
|
@@ -93,7 +93,6 @@ require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs')
|
|
|
93
93
|
require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
94
94
|
require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
95
95
|
require('@hcaptcha/react-hcaptcha');
|
|
96
|
-
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
97
96
|
require('../../helpers/convertExchangeKeyAndProviderEnum.cjs');
|
|
98
97
|
require('../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.cjs');
|
|
99
98
|
require('../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
@@ -108,6 +107,7 @@ require('../../components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
|
108
107
|
require('../../../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
|
|
109
108
|
require('../../components/PasskeyCard/PasskeyCard.cjs');
|
|
110
109
|
var useEmbeddedReveal = require('../../../../utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs');
|
|
110
|
+
var useIsPasswordEncrypted = require('../../../../utils/hooks/useIsPasswordEncrypted/useIsPasswordEncrypted.cjs');
|
|
111
111
|
require('../CryptoComOnramp/CryptoComOnramp.cjs');
|
|
112
112
|
require('../../../../../index.cjs');
|
|
113
113
|
require('../ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
@@ -123,32 +123,15 @@ const ExportAndRecoveryView = () => {
|
|
|
123
123
|
const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
|
|
124
124
|
const { primaryWallet, setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
|
|
125
125
|
const { pushView } = ViewContext.useViewContext();
|
|
126
|
-
const user = useUser.useUser();
|
|
127
126
|
const { getEOAWallet } = useSmartWallets.useSmartWallets();
|
|
128
127
|
const { initPasskeyRecoveryProcess, shouldInitRecovery } = usePasskeyRecovery.usePasskeyRecovery();
|
|
129
128
|
const { initExportProcess } = useEmbeddedReveal.useEmbeddedReveal();
|
|
129
|
+
const isPasswordEncrypted = useIsPasswordEncrypted.useIsPasswordEncrypted();
|
|
130
130
|
const eoaWallet = primaryWallet && getEOAWallet(primaryWallet);
|
|
131
131
|
const wallet = eoaWallet !== null && eoaWallet !== void 0 ? eoaWallet : primaryWallet;
|
|
132
132
|
const isSessionKeyCompatible = (primaryWallet && walletConnectorCore.isSessionKeyCompatibleWallet(primaryWallet)) ||
|
|
133
133
|
(eoaWallet && walletConnectorCore.isSessionKeyCompatibleWallet(eoaWallet));
|
|
134
134
|
const isV3WaasWallet = Boolean(wallet && ((_b = (_a = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _a === void 0 ? void 0 : _a.key) === null || _b === void 0 ? void 0 : _b.startsWith('dynamicwaas')));
|
|
135
|
-
const walletCredential = React.useMemo(() => {
|
|
136
|
-
var _a;
|
|
137
|
-
if (!user || !primaryWallet)
|
|
138
|
-
return undefined;
|
|
139
|
-
return (_a = user.verifiedCredentials) === null || _a === void 0 ? void 0 : _a.find((cred) => cred.walletName === 'dynamicwaas' &&
|
|
140
|
-
cred.address === primaryWallet.address);
|
|
141
|
-
}, [user, primaryWallet]);
|
|
142
|
-
const isPasswordEncrypted = React.useMemo(() => {
|
|
143
|
-
var _a;
|
|
144
|
-
const keyShares = (_a = walletCredential === null || walletCredential === void 0 ? void 0 : walletCredential.walletProperties) === null || _a === void 0 ? void 0 : _a.keyShares;
|
|
145
|
-
if (!keyShares || !Array.isArray(keyShares))
|
|
146
|
-
return false;
|
|
147
|
-
return keyShares.some((keyShare) => keyShare &&
|
|
148
|
-
typeof keyShare === 'object' &&
|
|
149
|
-
'passwordEncrypted' in keyShare &&
|
|
150
|
-
keyShare.passwordEncrypted === true);
|
|
151
|
-
}, [walletCredential]);
|
|
152
135
|
const handleBackClick = React.useCallback(() => setDynamicWidgetView('account-and-security-settings'), [setDynamicWidgetView]);
|
|
153
136
|
const handlePrivateKeyClick = React.useCallback(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
154
137
|
if (!isSessionKeyCompatible) {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { __awaiter } from '../../../../../../_virtual/_tslib.js';
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
-
import {
|
|
4
|
+
import { useCallback, useMemo } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { isSessionKeyCompatibleWallet } from '@dynamic-labs/wallet-connector-core';
|
|
7
|
-
import '
|
|
8
|
-
import '
|
|
9
|
-
import '../../../../
|
|
10
|
-
import '
|
|
11
|
-
import '../../../../
|
|
7
|
+
import { IconButton } from '../../../../components/IconButton/IconButton.js';
|
|
8
|
+
import { ModalHeader } from '../../../../components/ModalHeader/ModalHeader.js';
|
|
9
|
+
import { Typography } from '../../../../components/Typography/Typography.js';
|
|
10
|
+
import { TypographyButton } from '../../../../components/TypographyButton/TypographyButton.js';
|
|
11
|
+
import '../../../../context/DynamicContext/DynamicContext.js';
|
|
12
|
+
import '../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
|
|
12
13
|
import '@dynamic-labs/iconic';
|
|
13
14
|
import { ReactComponent as SvgChevronLeft } from '../../../../shared/assets/chevron-left.js';
|
|
14
15
|
import { ReactComponent as SvgExportPrivateKey } from '../../../../shared/assets/export-private-key.js';
|
|
@@ -19,25 +20,23 @@ import '@dynamic-labs/wallet-book';
|
|
|
19
20
|
import '@dynamic-labs/utils';
|
|
20
21
|
import '../../../../utils/constants/colors.js';
|
|
21
22
|
import '../../../../utils/constants/values.js';
|
|
23
|
+
import '@dynamic-labs/sdk-api-core';
|
|
22
24
|
import '../../../../shared/consts/index.js';
|
|
25
|
+
import '../../../../events/dynamicEvents.js';
|
|
26
|
+
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
27
|
+
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
23
28
|
import '@dynamic-labs/multi-wallet';
|
|
24
29
|
import 'react-international-phone';
|
|
25
30
|
import '../../../../store/state/nonce/nonce.js';
|
|
31
|
+
import '@dynamic-labs-sdk/client/core';
|
|
32
|
+
import '../../../../client/client.js';
|
|
33
|
+
import '@dynamic-labs-sdk/client';
|
|
34
|
+
import '../../../../config/ApiEndpoint.js';
|
|
26
35
|
import '@dynamic-labs/locale';
|
|
27
36
|
import '../../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
28
37
|
import '../../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
29
38
|
import '../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
30
39
|
import '../../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.js';
|
|
31
|
-
import '../../../../events/dynamicEvents.js';
|
|
32
|
-
import { useUser } from '../../../../client/extension/user/useUser/useUser.js';
|
|
33
|
-
import { IconButton } from '../../../../components/IconButton/IconButton.js';
|
|
34
|
-
import { ModalHeader } from '../../../../components/ModalHeader/ModalHeader.js';
|
|
35
|
-
import { Typography } from '../../../../components/Typography/Typography.js';
|
|
36
|
-
import { TypographyButton } from '../../../../components/TypographyButton/TypographyButton.js';
|
|
37
|
-
import '../../../../context/DynamicContext/DynamicContext.js';
|
|
38
|
-
import '../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
|
|
39
|
-
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
40
|
-
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
41
40
|
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
42
41
|
import '../../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
43
42
|
import '../../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
@@ -82,6 +81,7 @@ import 'qrcode';
|
|
|
82
81
|
import 'formik';
|
|
83
82
|
import '../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
84
83
|
import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
84
|
+
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
85
85
|
import '../../../../utils/hooks/useWalletBackup/useWalletBackup.js';
|
|
86
86
|
import '../../../../utils/hooks/useWalletBackup/types.js';
|
|
87
87
|
import '../../../../utils/hooks/useWalletBackup/cloudProviders.js';
|
|
@@ -89,7 +89,6 @@ import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
|
89
89
|
import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
90
90
|
import '../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
91
91
|
import '@hcaptcha/react-hcaptcha';
|
|
92
|
-
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
93
92
|
import '../../helpers/convertExchangeKeyAndProviderEnum.js';
|
|
94
93
|
import '../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.js';
|
|
95
94
|
import '../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
@@ -104,6 +103,7 @@ import '../../components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
|
104
103
|
import '../../../../views/TransactionConfirmationView/TransactionConfirmationView.js';
|
|
105
104
|
import '../../components/PasskeyCard/PasskeyCard.js';
|
|
106
105
|
import { useEmbeddedReveal } from '../../../../utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js';
|
|
106
|
+
import { useIsPasswordEncrypted } from '../../../../utils/hooks/useIsPasswordEncrypted/useIsPasswordEncrypted.js';
|
|
107
107
|
import '../CryptoComOnramp/CryptoComOnramp.js';
|
|
108
108
|
import '../../../../../index.js';
|
|
109
109
|
import '../ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
@@ -119,32 +119,15 @@ const ExportAndRecoveryView = () => {
|
|
|
119
119
|
const { setDynamicWidgetView } = useWidgetContext();
|
|
120
120
|
const { primaryWallet, setShowAuthFlow } = useInternalDynamicContext();
|
|
121
121
|
const { pushView } = useViewContext();
|
|
122
|
-
const user = useUser();
|
|
123
122
|
const { getEOAWallet } = useSmartWallets();
|
|
124
123
|
const { initPasskeyRecoveryProcess, shouldInitRecovery } = usePasskeyRecovery();
|
|
125
124
|
const { initExportProcess } = useEmbeddedReveal();
|
|
125
|
+
const isPasswordEncrypted = useIsPasswordEncrypted();
|
|
126
126
|
const eoaWallet = primaryWallet && getEOAWallet(primaryWallet);
|
|
127
127
|
const wallet = eoaWallet !== null && eoaWallet !== void 0 ? eoaWallet : primaryWallet;
|
|
128
128
|
const isSessionKeyCompatible = (primaryWallet && isSessionKeyCompatibleWallet(primaryWallet)) ||
|
|
129
129
|
(eoaWallet && isSessionKeyCompatibleWallet(eoaWallet));
|
|
130
130
|
const isV3WaasWallet = Boolean(wallet && ((_b = (_a = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _a === void 0 ? void 0 : _a.key) === null || _b === void 0 ? void 0 : _b.startsWith('dynamicwaas')));
|
|
131
|
-
const walletCredential = useMemo(() => {
|
|
132
|
-
var _a;
|
|
133
|
-
if (!user || !primaryWallet)
|
|
134
|
-
return undefined;
|
|
135
|
-
return (_a = user.verifiedCredentials) === null || _a === void 0 ? void 0 : _a.find((cred) => cred.walletName === 'dynamicwaas' &&
|
|
136
|
-
cred.address === primaryWallet.address);
|
|
137
|
-
}, [user, primaryWallet]);
|
|
138
|
-
const isPasswordEncrypted = useMemo(() => {
|
|
139
|
-
var _a;
|
|
140
|
-
const keyShares = (_a = walletCredential === null || walletCredential === void 0 ? void 0 : walletCredential.walletProperties) === null || _a === void 0 ? void 0 : _a.keyShares;
|
|
141
|
-
if (!keyShares || !Array.isArray(keyShares))
|
|
142
|
-
return false;
|
|
143
|
-
return keyShares.some((keyShare) => keyShare &&
|
|
144
|
-
typeof keyShare === 'object' &&
|
|
145
|
-
'passwordEncrypted' in keyShare &&
|
|
146
|
-
keyShare.passwordEncrypted === true);
|
|
147
|
-
}, [walletCredential]);
|
|
148
131
|
const handleBackClick = useCallback(() => setDynamicWidgetView('account-and-security-settings'), [setDynamicWidgetView]);
|
|
149
132
|
const handlePrivateKeyClick = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
150
133
|
if (!isSessionKeyCompatible) {
|
package/src/lib/widgets/DynamicWidget/views/ExportSharesPasscodeView/ExportSharesPasscodeView.cjs
CHANGED
|
@@ -82,6 +82,7 @@ require('qrcode');
|
|
|
82
82
|
require('formik');
|
|
83
83
|
require('../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
|
|
84
84
|
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
85
|
+
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
85
86
|
require('../../../../utils/hooks/useWalletBackup/useWalletBackup.cjs');
|
|
86
87
|
require('../../../../utils/hooks/useWalletBackup/types.cjs');
|
|
87
88
|
require('../../../../utils/hooks/useWalletBackup/cloudProviders.cjs');
|
|
@@ -89,7 +90,6 @@ require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs')
|
|
|
89
90
|
require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
90
91
|
require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
91
92
|
require('@hcaptcha/react-hcaptcha');
|
|
92
|
-
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
93
93
|
require('../../helpers/convertExchangeKeyAndProviderEnum.cjs');
|
|
94
94
|
require('../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.cjs');
|
|
95
95
|
require('../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
package/src/lib/widgets/DynamicWidget/views/ExportSharesPasscodeView/ExportSharesPasscodeView.js
CHANGED
|
@@ -78,6 +78,7 @@ import 'qrcode';
|
|
|
78
78
|
import 'formik';
|
|
79
79
|
import '../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
80
80
|
import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
81
|
+
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
81
82
|
import '../../../../utils/hooks/useWalletBackup/useWalletBackup.js';
|
|
82
83
|
import '../../../../utils/hooks/useWalletBackup/types.js';
|
|
83
84
|
import '../../../../utils/hooks/useWalletBackup/cloudProviders.js';
|
|
@@ -85,7 +86,6 @@ import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
|
85
86
|
import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
86
87
|
import '../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
87
88
|
import '@hcaptcha/react-hcaptcha';
|
|
88
|
-
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
89
89
|
import '../../helpers/convertExchangeKeyAndProviderEnum.js';
|
|
90
90
|
import '../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.js';
|
|
91
91
|
import '../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
@@ -77,6 +77,7 @@ require('qrcode');
|
|
|
77
77
|
require('formik');
|
|
78
78
|
require('../../../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
|
|
79
79
|
require('../../../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
80
|
+
require('../../../../context/DynamicWidgetContext.cjs');
|
|
80
81
|
require('../../../../../../utils/hooks/useWalletBackup/useWalletBackup.cjs');
|
|
81
82
|
require('../../../../../../utils/hooks/useWalletBackup/types.cjs');
|
|
82
83
|
require('../../../../../../utils/hooks/useWalletBackup/cloudProviders.cjs');
|
|
@@ -84,7 +85,6 @@ require('../../../../../../context/IpConfigurationContext/IpConfigurationContext
|
|
|
84
85
|
require('../../../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
85
86
|
require('../../../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
86
87
|
require('@hcaptcha/react-hcaptcha');
|
|
87
|
-
require('../../../../context/DynamicWidgetContext.cjs');
|
|
88
88
|
require('../../../../helpers/convertExchangeKeyAndProviderEnum.cjs');
|
|
89
89
|
require('../../../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.cjs');
|
|
90
90
|
require('../../../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
@@ -73,6 +73,7 @@ import 'qrcode';
|
|
|
73
73
|
import 'formik';
|
|
74
74
|
import '../../../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
75
75
|
import '../../../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
76
|
+
import '../../../../context/DynamicWidgetContext.js';
|
|
76
77
|
import '../../../../../../utils/hooks/useWalletBackup/useWalletBackup.js';
|
|
77
78
|
import '../../../../../../utils/hooks/useWalletBackup/types.js';
|
|
78
79
|
import '../../../../../../utils/hooks/useWalletBackup/cloudProviders.js';
|
|
@@ -80,7 +81,6 @@ import '../../../../../../context/IpConfigurationContext/IpConfigurationContext.
|
|
|
80
81
|
import '../../../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
81
82
|
import '../../../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
82
83
|
import '@hcaptcha/react-hcaptcha';
|
|
83
|
-
import '../../../../context/DynamicWidgetContext.js';
|
|
84
84
|
import '../../../../helpers/convertExchangeKeyAndProviderEnum.js';
|
|
85
85
|
import '../../../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.js';
|
|
86
86
|
import '../../../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
@@ -79,6 +79,7 @@ var useFetchCurrency = require('../../../../hooks/useFetchCurrency/useFetchCurre
|
|
|
79
79
|
require('formik');
|
|
80
80
|
require('../../../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
|
|
81
81
|
require('../../../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
82
|
+
require('../../../../context/DynamicWidgetContext.cjs');
|
|
82
83
|
require('../../../../../../utils/hooks/useWalletBackup/useWalletBackup.cjs');
|
|
83
84
|
require('../../../../../../utils/hooks/useWalletBackup/types.cjs');
|
|
84
85
|
require('../../../../../../utils/hooks/useWalletBackup/cloudProviders.cjs');
|
|
@@ -86,7 +87,6 @@ require('../../../../../../context/IpConfigurationContext/IpConfigurationContext
|
|
|
86
87
|
require('../../../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
87
88
|
require('../../../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
88
89
|
require('@hcaptcha/react-hcaptcha');
|
|
89
|
-
require('../../../../context/DynamicWidgetContext.cjs');
|
|
90
90
|
require('../../../../helpers/convertExchangeKeyAndProviderEnum.cjs');
|
|
91
91
|
require('../../../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.cjs');
|
|
92
92
|
require('../../../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
@@ -75,6 +75,7 @@ import { useFetchCurrency } from '../../../../hooks/useFetchCurrency/useFetchCur
|
|
|
75
75
|
import 'formik';
|
|
76
76
|
import '../../../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
77
77
|
import '../../../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
78
|
+
import '../../../../context/DynamicWidgetContext.js';
|
|
78
79
|
import '../../../../../../utils/hooks/useWalletBackup/useWalletBackup.js';
|
|
79
80
|
import '../../../../../../utils/hooks/useWalletBackup/types.js';
|
|
80
81
|
import '../../../../../../utils/hooks/useWalletBackup/cloudProviders.js';
|
|
@@ -82,7 +83,6 @@ import '../../../../../../context/IpConfigurationContext/IpConfigurationContext.
|
|
|
82
83
|
import '../../../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
83
84
|
import '../../../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
84
85
|
import '@hcaptcha/react-hcaptcha';
|
|
85
|
-
import '../../../../context/DynamicWidgetContext.js';
|
|
86
86
|
import '../../../../helpers/convertExchangeKeyAndProviderEnum.js';
|
|
87
87
|
import '../../../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.js';
|
|
88
88
|
import '../../../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
package/src/lib/widgets/DynamicWidget/views/ResetPasswordCurrentView/ResetPasswordCurrentView.cjs
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var reactI18next = require('react-i18next');
|
|
9
|
+
var Icon = require('../../../../components/Icon/Icon.cjs');
|
|
10
|
+
var IconButton = require('../../../../components/IconButton/IconButton.cjs');
|
|
11
|
+
var Input = require('../../../../components/Input/Input.cjs');
|
|
12
|
+
var ModalHeader = require('../../../../components/ModalHeader/ModalHeader.cjs');
|
|
13
|
+
var ToggleVisibilityButton = require('../../../../components/ToggleVisibilityButton/ToggleVisibilityButton.cjs');
|
|
14
|
+
var Typography = require('../../../../components/Typography/Typography.cjs');
|
|
15
|
+
var TypographyButton = require('../../../../components/TypographyButton/TypographyButton.cjs');
|
|
16
|
+
var chevronLeft = require('../../../../shared/assets/chevron-left.cjs');
|
|
17
|
+
var errorCircleX = require('../../../../shared/assets/error-circle-x.cjs');
|
|
18
|
+
var passwordLockIcon = require('../../../../shared/assets/password-lock-icon.cjs');
|
|
19
|
+
require('@dynamic-labs/iconic');
|
|
20
|
+
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
21
|
+
|
|
22
|
+
const ResetPasswordCurrentView = ({ onContinue, onBack, isLoading = false, error: externalError = null, }) => {
|
|
23
|
+
const { t } = reactI18next.useTranslation();
|
|
24
|
+
const [password, setPassword] = React.useState('');
|
|
25
|
+
const [showPassword, setShowPassword] = React.useState(false);
|
|
26
|
+
const [internalError, setInternalError] = React.useState(null);
|
|
27
|
+
const error = externalError !== null && externalError !== void 0 ? externalError : internalError;
|
|
28
|
+
const handlePasswordChange = React.useCallback((e) => {
|
|
29
|
+
setPassword(e.target.value);
|
|
30
|
+
setInternalError(null);
|
|
31
|
+
}, []);
|
|
32
|
+
const handleToggleVisibility = React.useCallback((hidden) => {
|
|
33
|
+
setShowPassword(!hidden);
|
|
34
|
+
}, []);
|
|
35
|
+
const handleContinue = React.useCallback(() => {
|
|
36
|
+
if (!password) {
|
|
37
|
+
setInternalError(t('dyn_reset_password.current.error.required'));
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
onContinue(password);
|
|
41
|
+
}, [password, onContinue, t]);
|
|
42
|
+
const backButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: onBack, "data-testid": 'reset-password-current-back-button', children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }));
|
|
43
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', copykey: 'dyn_reset_password.current.title', children: t('dyn_reset_password.current.title') }) }), jsxRuntime.jsx("div", { className: 'enter-password-view', children: jsxRuntime.jsxs("div", { className: 'enter-password-view__body', children: [jsxRuntime.jsx("div", { className: 'enter-password-view__icon-container', children: jsxRuntime.jsx(Icon.Icon, { color: 'brand-primary', children: jsxRuntime.jsx(passwordLockIcon.ReactComponent, { width: 64, height: 64 }) }) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_reset_password.current.description', className: 'enter-password-view__description', children: t('dyn_reset_password.current.description') }), jsxRuntime.jsx(Input.Input, { id: 'reset-password-current-input', type: showPassword ? 'text' : 'password', label: t('dyn_reset_password.current.label'), placeholder: t('dyn_reset_password.current.placeholder'), value: password, onChange: handlePasswordChange, variant: 'regular', error: Boolean(error), message: error ? (jsxRuntime.jsxs("span", { className: 'enter-password-view__error-message', children: [jsxRuntime.jsx(errorCircleX.ReactComponent, { width: 14, height: 14 }), error] })) : undefined, suffix:
|
|
44
|
+
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
45
|
+
jsxRuntime.jsx(ToggleVisibilityButton.ToggleVisibilityButton, { initialState: true, onClick: handleToggleVisibility }) }), jsxRuntime.jsx("div", { className: 'enter-password-view__actions', children: jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'reset-password-current-continue-button', onClick: handleContinue, disabled: !password || isLoading, copykey: 'dyn_setup_password.button.continue', buttonVariant: 'brand-primary', typographyProps: {
|
|
46
|
+
color: 'inherit',
|
|
47
|
+
}, expanded: true, children: t('dyn_setup_password.button.continue') }) })] }) })] }));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
exports.ResetPasswordCurrentView = ResetPasswordCurrentView;
|
package/src/lib/widgets/DynamicWidget/views/ResetPasswordCurrentView/ResetPasswordCurrentView.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export type ResetPasswordCurrentViewProps = {
|
|
3
|
+
onContinue: (password: string) => void;
|
|
4
|
+
onBack: () => void;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
error?: string | null;
|
|
7
|
+
};
|
|
8
|
+
export declare const ResetPasswordCurrentView: FC<ResetPasswordCurrentViewProps>;
|