@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/ResetPasswordCurrentView/ResetPasswordCurrentView.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useCallback } from 'react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { Icon } from '../../../../components/Icon/Icon.js';
|
|
6
|
+
import { IconButton } from '../../../../components/IconButton/IconButton.js';
|
|
7
|
+
import { Input } from '../../../../components/Input/Input.js';
|
|
8
|
+
import { ModalHeader } from '../../../../components/ModalHeader/ModalHeader.js';
|
|
9
|
+
import { ToggleVisibilityButton } from '../../../../components/ToggleVisibilityButton/ToggleVisibilityButton.js';
|
|
10
|
+
import { Typography } from '../../../../components/Typography/Typography.js';
|
|
11
|
+
import { TypographyButton } from '../../../../components/TypographyButton/TypographyButton.js';
|
|
12
|
+
import { ReactComponent as SvgChevronLeft } from '../../../../shared/assets/chevron-left.js';
|
|
13
|
+
import { ReactComponent as SvgErrorCircleX } from '../../../../shared/assets/error-circle-x.js';
|
|
14
|
+
import { ReactComponent as SvgPasswordLockIcon } from '../../../../shared/assets/password-lock-icon.js';
|
|
15
|
+
import '@dynamic-labs/iconic';
|
|
16
|
+
import '../../../../context/ViewContext/ViewContext.js';
|
|
17
|
+
|
|
18
|
+
const ResetPasswordCurrentView = ({ onContinue, onBack, isLoading = false, error: externalError = null, }) => {
|
|
19
|
+
const { t } = useTranslation();
|
|
20
|
+
const [password, setPassword] = useState('');
|
|
21
|
+
const [showPassword, setShowPassword] = useState(false);
|
|
22
|
+
const [internalError, setInternalError] = useState(null);
|
|
23
|
+
const error = externalError !== null && externalError !== void 0 ? externalError : internalError;
|
|
24
|
+
const handlePasswordChange = useCallback((e) => {
|
|
25
|
+
setPassword(e.target.value);
|
|
26
|
+
setInternalError(null);
|
|
27
|
+
}, []);
|
|
28
|
+
const handleToggleVisibility = useCallback((hidden) => {
|
|
29
|
+
setShowPassword(!hidden);
|
|
30
|
+
}, []);
|
|
31
|
+
const handleContinue = useCallback(() => {
|
|
32
|
+
if (!password) {
|
|
33
|
+
setInternalError(t('dyn_reset_password.current.error.required'));
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
onContinue(password);
|
|
37
|
+
}, [password, onContinue, t]);
|
|
38
|
+
const backButton = (jsx(IconButton, { type: 'button', onClick: onBack, "data-testid": 'reset-password-current-back-button', children: jsx(SvgChevronLeft, {}) }));
|
|
39
|
+
return (jsxs(Fragment, { children: [jsx(ModalHeader, { leading: backButton, children: jsx(Typography, { variant: 'title', color: 'primary', copykey: 'dyn_reset_password.current.title', children: t('dyn_reset_password.current.title') }) }), jsx("div", { className: 'enter-password-view', children: jsxs("div", { className: 'enter-password-view__body', children: [jsx("div", { className: 'enter-password-view__icon-container', children: jsx(Icon, { color: 'brand-primary', children: jsx(SvgPasswordLockIcon, { width: 64, height: 64 }) }) }), jsx(Typography, { variant: 'body_normal', color: 'secondary', copykey: 'dyn_reset_password.current.description', className: 'enter-password-view__description', children: t('dyn_reset_password.current.description') }), jsx(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 ? (jsxs("span", { className: 'enter-password-view__error-message', children: [jsx(SvgErrorCircleX, { width: 14, height: 14 }), error] })) : undefined, suffix:
|
|
40
|
+
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
41
|
+
jsx(ToggleVisibilityButton, { initialState: true, onClick: handleToggleVisibility }) }), jsx("div", { className: 'enter-password-view__actions', children: jsx(TypographyButton, { dataTestId: 'reset-password-current-continue-button', onClick: handleContinue, disabled: !password || isLoading, copykey: 'dyn_setup_password.button.continue', buttonVariant: 'brand-primary', typographyProps: {
|
|
42
|
+
color: 'inherit',
|
|
43
|
+
}, expanded: true, children: t('dyn_setup_password.button.continue') }) })] }) })] }));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { ResetPasswordCurrentView };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ResetPasswordCurrentView } from './ResetPasswordCurrentView';
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var _tslib = require('../../../../../../_virtual/_tslib.cjs');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var React = require('react');
|
|
9
|
+
var reactI18next = require('react-i18next');
|
|
10
|
+
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
11
|
+
require('../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
|
|
12
|
+
require('@dynamic-labs/iconic');
|
|
13
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
14
|
+
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
15
|
+
var logger = require('../../../../shared/logger.cjs');
|
|
16
|
+
require('@dynamic-labs/wallet-book');
|
|
17
|
+
require('@dynamic-labs/utils');
|
|
18
|
+
require('../../../../utils/constants/colors.cjs');
|
|
19
|
+
require('../../../../utils/constants/values.cjs');
|
|
20
|
+
require('@dynamic-labs/sdk-api-core');
|
|
21
|
+
require('../../../../shared/consts/index.cjs');
|
|
22
|
+
require('../../../../events/dynamicEvents.cjs');
|
|
23
|
+
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
24
|
+
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
25
|
+
require('@dynamic-labs/multi-wallet');
|
|
26
|
+
require('react-international-phone');
|
|
27
|
+
require('../../../../store/state/nonce/nonce.cjs');
|
|
28
|
+
require('@dynamic-labs-sdk/client/core');
|
|
29
|
+
require('../../../../client/client.cjs');
|
|
30
|
+
require('@dynamic-labs-sdk/client');
|
|
31
|
+
require('../../../../config/ApiEndpoint.cjs');
|
|
32
|
+
require('@dynamic-labs/locale');
|
|
33
|
+
require('../../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
34
|
+
require('../../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
35
|
+
require('../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
36
|
+
require('../../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.cjs');
|
|
37
|
+
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
38
|
+
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
39
|
+
require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
40
|
+
require('../../../../store/state/authMode/authMode.cjs');
|
|
41
|
+
require('../../../../context/VerificationContext/VerificationContext.cjs');
|
|
42
|
+
require('react-dom');
|
|
43
|
+
require('../../../../utils/functions/compareChains/compareChains.cjs');
|
|
44
|
+
require('../../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
|
|
45
|
+
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
46
|
+
var useSmartWallets = require('../../../../utils/hooks/useSmartWallets/useSmartWallets.cjs');
|
|
47
|
+
require('../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
|
|
48
|
+
require('bs58');
|
|
49
|
+
require('@dynamic-labs/types');
|
|
50
|
+
require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
51
|
+
require('../../../../context/LoadingContext/LoadingContext.cjs');
|
|
52
|
+
require('../../../../context/WalletContext/WalletContext.cjs');
|
|
53
|
+
require('../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
|
|
54
|
+
require('yup');
|
|
55
|
+
require('../../../../context/MockContext/MockContext.cjs');
|
|
56
|
+
require('../../../../views/CollectUserDataView/useFields.cjs');
|
|
57
|
+
require('../../../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
58
|
+
require('../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
59
|
+
require('@dynamic-labs/rpc-providers');
|
|
60
|
+
require('../../../../store/state/walletOptions/walletOptions.cjs');
|
|
61
|
+
require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
62
|
+
require('../../../../components/Alert/Alert.cjs');
|
|
63
|
+
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
64
|
+
require('../../../../components/IconButton/IconButton.cjs');
|
|
65
|
+
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
66
|
+
require('../../../../components/Input/Input.cjs');
|
|
67
|
+
require('../../../../components/IsBrowser/IsBrowser.cjs');
|
|
68
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
69
|
+
require('../../../../components/OverlayCard/OverlayCard.cjs');
|
|
70
|
+
require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
71
|
+
require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
72
|
+
require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
73
|
+
require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
74
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
75
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
76
|
+
require('react-focus-lock');
|
|
77
|
+
require('qrcode');
|
|
78
|
+
require('formik');
|
|
79
|
+
require('../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
|
|
80
|
+
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
81
|
+
require('../../context/DynamicWidgetContext.cjs');
|
|
82
|
+
var SetupPasswordConfirmView = require('../SetupPasswordConfirmView/SetupPasswordConfirmView.cjs');
|
|
83
|
+
var SetupPasswordEnterView = require('../SetupPasswordEnterView/SetupPasswordEnterView.cjs');
|
|
84
|
+
var SetupPasswordSuccessView = require('../SetupPasswordSuccessView/SetupPasswordSuccessView.cjs');
|
|
85
|
+
require('../../../../utils/hooks/useWalletBackup/useWalletBackup.cjs');
|
|
86
|
+
require('../../../../utils/hooks/useWalletBackup/types.cjs');
|
|
87
|
+
require('../../../../utils/hooks/useWalletBackup/cloudProviders.cjs');
|
|
88
|
+
require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
89
|
+
require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
90
|
+
require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
91
|
+
require('@hcaptcha/react-hcaptcha');
|
|
92
|
+
require('../../helpers/convertExchangeKeyAndProviderEnum.cjs');
|
|
93
|
+
require('../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.cjs');
|
|
94
|
+
require('../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
95
|
+
require('../../../../context/FooterAnimationContext/index.cjs');
|
|
96
|
+
require('../../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.cjs');
|
|
97
|
+
require('../../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
98
|
+
var useWalletPassword = require('../../../../utils/hooks/useWalletPassword/useWalletPassword.cjs');
|
|
99
|
+
var ResetPasswordCurrentView = require('../ResetPasswordCurrentView/ResetPasswordCurrentView.cjs');
|
|
100
|
+
require('../../../../context/OnrampContext/OnrampContext.cjs');
|
|
101
|
+
require('../../../../store/state/sendBalances.cjs');
|
|
102
|
+
require('../../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
103
|
+
require('../../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
104
|
+
require('../../components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
105
|
+
require('../../../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
|
|
106
|
+
require('../../components/PasskeyCard/PasskeyCard.cjs');
|
|
107
|
+
require('../CryptoComOnramp/CryptoComOnramp.cjs');
|
|
108
|
+
require('../../../../../index.cjs');
|
|
109
|
+
require('../ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
110
|
+
require('../../../../store/state/tokenBalances.cjs');
|
|
111
|
+
require('../../../../store/state/multichainBalances.cjs');
|
|
112
|
+
require('../../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
|
|
113
|
+
var useInternalDynamicContext = require('../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.cjs');
|
|
114
|
+
|
|
115
|
+
const ResetPasswordView = ({ onComplete, }) => {
|
|
116
|
+
const { t } = reactI18next.useTranslation();
|
|
117
|
+
const { primaryWallet, setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
|
|
118
|
+
const { getEOAWallet } = useSmartWallets.useSmartWallets();
|
|
119
|
+
const { unlockWallet } = useWalletPassword.useWalletPassword();
|
|
120
|
+
const eoaWallet = primaryWallet && getEOAWallet(primaryWallet);
|
|
121
|
+
const wallet = eoaWallet !== null && eoaWallet !== void 0 ? eoaWallet : primaryWallet;
|
|
122
|
+
const [currentStep, setCurrentStep] = React.useState('current');
|
|
123
|
+
const [currentPassword, setCurrentPassword] = React.useState('');
|
|
124
|
+
const [newPassword, setNewPassword] = React.useState('');
|
|
125
|
+
const [verifyError, setVerifyError] = React.useState(null);
|
|
126
|
+
const [isVerifying, setIsVerifying] = React.useState(false);
|
|
127
|
+
const handleCurrentPasswordContinue = React.useCallback((password) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
128
|
+
if (!(wallet === null || wallet === void 0 ? void 0 : wallet.address) || !(wallet === null || wallet === void 0 ? void 0 : wallet.chain)) {
|
|
129
|
+
logger.logger.error('No wallet address or chain available for password verification');
|
|
130
|
+
setVerifyError(t('dyn_reset_password.current.error.failed'));
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
setIsVerifying(true);
|
|
134
|
+
setVerifyError(null);
|
|
135
|
+
const success = yield unlockWallet({
|
|
136
|
+
accountAddress: wallet.address,
|
|
137
|
+
chainName: wallet.chain,
|
|
138
|
+
password,
|
|
139
|
+
});
|
|
140
|
+
setIsVerifying(false);
|
|
141
|
+
if (success) {
|
|
142
|
+
setCurrentPassword(password);
|
|
143
|
+
setCurrentStep('enter');
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
setVerifyError(t('dyn_reset_password.current.error.invalid_password'));
|
|
147
|
+
}
|
|
148
|
+
}), [wallet, unlockWallet, t]);
|
|
149
|
+
const handleCurrentPasswordBack = React.useCallback(() => {
|
|
150
|
+
setShowAuthFlow(false);
|
|
151
|
+
}, [setShowAuthFlow]);
|
|
152
|
+
const handleEnterContinue = React.useCallback((password) => {
|
|
153
|
+
setNewPassword(password);
|
|
154
|
+
setCurrentStep('confirm');
|
|
155
|
+
}, []);
|
|
156
|
+
const handleEnterBack = React.useCallback(() => {
|
|
157
|
+
setCurrentStep('current');
|
|
158
|
+
}, []);
|
|
159
|
+
const handleConfirmContinue = React.useCallback(() => {
|
|
160
|
+
setCurrentStep('success');
|
|
161
|
+
}, []);
|
|
162
|
+
const handleConfirmBack = React.useCallback(() => {
|
|
163
|
+
setCurrentStep('enter');
|
|
164
|
+
}, []);
|
|
165
|
+
const handleSuccess = React.useCallback(() => {
|
|
166
|
+
onComplete(currentPassword, newPassword);
|
|
167
|
+
}, [onComplete, currentPassword, newPassword]);
|
|
168
|
+
switch (currentStep) {
|
|
169
|
+
case 'current':
|
|
170
|
+
return (jsxRuntime.jsx(ResetPasswordCurrentView.ResetPasswordCurrentView, { onContinue: handleCurrentPasswordContinue, onBack: handleCurrentPasswordBack, isLoading: isVerifying, error: verifyError }));
|
|
171
|
+
case 'enter':
|
|
172
|
+
return (jsxRuntime.jsx(SetupPasswordEnterView.SetupPasswordEnterView, { onContinue: handleEnterContinue, onBack: handleEnterBack, title: t('dyn_reset_password.enter.title'), description: t('dyn_reset_password.enter.description'), oldPassword: currentPassword }));
|
|
173
|
+
case 'confirm':
|
|
174
|
+
return (jsxRuntime.jsx(SetupPasswordConfirmView.SetupPasswordConfirmView, { password: newPassword, onContinue: handleConfirmContinue, onBack: handleConfirmBack, title: t('dyn_reset_password.confirm.title'), description: t('dyn_reset_password.confirm.description'), showAcknowledgment: true }));
|
|
175
|
+
case 'success':
|
|
176
|
+
return (jsxRuntime.jsx(SetupPasswordSuccessView.SetupPasswordSuccessView, { onDone: handleSuccess, title: t('dyn_reset_password.success.title'), description: t('dyn_reset_password.success.description') }));
|
|
177
|
+
default:
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
exports.ResetPasswordView = ResetPasswordView;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { __awaiter } from '../../../../../../_virtual/_tslib.js';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { useState, useCallback } from 'react';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
|
+
import '../../../../context/DynamicContext/DynamicContext.js';
|
|
7
|
+
import '../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
|
|
8
|
+
import '@dynamic-labs/iconic';
|
|
9
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
10
|
+
import '../../../../context/ViewContext/ViewContext.js';
|
|
11
|
+
import { logger } from '../../../../shared/logger.js';
|
|
12
|
+
import '@dynamic-labs/wallet-book';
|
|
13
|
+
import '@dynamic-labs/utils';
|
|
14
|
+
import '../../../../utils/constants/colors.js';
|
|
15
|
+
import '../../../../utils/constants/values.js';
|
|
16
|
+
import '@dynamic-labs/sdk-api-core';
|
|
17
|
+
import '../../../../shared/consts/index.js';
|
|
18
|
+
import '../../../../events/dynamicEvents.js';
|
|
19
|
+
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
20
|
+
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
21
|
+
import '@dynamic-labs/multi-wallet';
|
|
22
|
+
import 'react-international-phone';
|
|
23
|
+
import '../../../../store/state/nonce/nonce.js';
|
|
24
|
+
import '@dynamic-labs-sdk/client/core';
|
|
25
|
+
import '../../../../client/client.js';
|
|
26
|
+
import '@dynamic-labs-sdk/client';
|
|
27
|
+
import '../../../../config/ApiEndpoint.js';
|
|
28
|
+
import '@dynamic-labs/locale';
|
|
29
|
+
import '../../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
30
|
+
import '../../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
31
|
+
import '../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
32
|
+
import '../../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.js';
|
|
33
|
+
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
34
|
+
import '../../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
35
|
+
import '../../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
36
|
+
import '../../../../store/state/authMode/authMode.js';
|
|
37
|
+
import '../../../../context/VerificationContext/VerificationContext.js';
|
|
38
|
+
import 'react-dom';
|
|
39
|
+
import '../../../../utils/functions/compareChains/compareChains.js';
|
|
40
|
+
import '../../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js';
|
|
41
|
+
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
42
|
+
import { useSmartWallets } from '../../../../utils/hooks/useSmartWallets/useSmartWallets.js';
|
|
43
|
+
import '../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
|
|
44
|
+
import 'bs58';
|
|
45
|
+
import '@dynamic-labs/types';
|
|
46
|
+
import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
47
|
+
import '../../../../context/LoadingContext/LoadingContext.js';
|
|
48
|
+
import '../../../../context/WalletContext/WalletContext.js';
|
|
49
|
+
import '../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
|
|
50
|
+
import 'yup';
|
|
51
|
+
import '../../../../context/MockContext/MockContext.js';
|
|
52
|
+
import '../../../../views/CollectUserDataView/useFields.js';
|
|
53
|
+
import '../../../../context/FieldsStateContext/FieldsStateContext.js';
|
|
54
|
+
import '../../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
55
|
+
import '@dynamic-labs/rpc-providers';
|
|
56
|
+
import '../../../../store/state/walletOptions/walletOptions.js';
|
|
57
|
+
import '../../../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
58
|
+
import '../../../../components/Alert/Alert.js';
|
|
59
|
+
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
60
|
+
import '../../../../components/IconButton/IconButton.js';
|
|
61
|
+
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
62
|
+
import '../../../../components/Input/Input.js';
|
|
63
|
+
import '../../../../components/IsBrowser/IsBrowser.js';
|
|
64
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
65
|
+
import '../../../../components/OverlayCard/OverlayCard.js';
|
|
66
|
+
import '../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
67
|
+
import '../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
68
|
+
import '../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
69
|
+
import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
70
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
71
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
72
|
+
import 'react-focus-lock';
|
|
73
|
+
import 'qrcode';
|
|
74
|
+
import 'formik';
|
|
75
|
+
import '../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
76
|
+
import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
77
|
+
import '../../context/DynamicWidgetContext.js';
|
|
78
|
+
import { SetupPasswordConfirmView } from '../SetupPasswordConfirmView/SetupPasswordConfirmView.js';
|
|
79
|
+
import { SetupPasswordEnterView } from '../SetupPasswordEnterView/SetupPasswordEnterView.js';
|
|
80
|
+
import { SetupPasswordSuccessView } from '../SetupPasswordSuccessView/SetupPasswordSuccessView.js';
|
|
81
|
+
import '../../../../utils/hooks/useWalletBackup/useWalletBackup.js';
|
|
82
|
+
import '../../../../utils/hooks/useWalletBackup/types.js';
|
|
83
|
+
import '../../../../utils/hooks/useWalletBackup/cloudProviders.js';
|
|
84
|
+
import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
85
|
+
import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
86
|
+
import '../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
87
|
+
import '@hcaptcha/react-hcaptcha';
|
|
88
|
+
import '../../helpers/convertExchangeKeyAndProviderEnum.js';
|
|
89
|
+
import '../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.js';
|
|
90
|
+
import '../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
91
|
+
import '../../../../context/FooterAnimationContext/index.js';
|
|
92
|
+
import '../../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.js';
|
|
93
|
+
import '../../../../context/PasskeyContext/PasskeyContext.js';
|
|
94
|
+
import { useWalletPassword } from '../../../../utils/hooks/useWalletPassword/useWalletPassword.js';
|
|
95
|
+
import { ResetPasswordCurrentView } from '../ResetPasswordCurrentView/ResetPasswordCurrentView.js';
|
|
96
|
+
import '../../../../context/OnrampContext/OnrampContext.js';
|
|
97
|
+
import '../../../../store/state/sendBalances.js';
|
|
98
|
+
import '../../../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
99
|
+
import '../../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.js';
|
|
100
|
+
import '../../components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
101
|
+
import '../../../../views/TransactionConfirmationView/TransactionConfirmationView.js';
|
|
102
|
+
import '../../components/PasskeyCard/PasskeyCard.js';
|
|
103
|
+
import '../CryptoComOnramp/CryptoComOnramp.js';
|
|
104
|
+
import '../../../../../index.js';
|
|
105
|
+
import '../ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
106
|
+
import '../../../../store/state/tokenBalances.js';
|
|
107
|
+
import '../../../../store/state/multichainBalances.js';
|
|
108
|
+
import '../../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
109
|
+
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.js';
|
|
110
|
+
|
|
111
|
+
const ResetPasswordView = ({ onComplete, }) => {
|
|
112
|
+
const { t } = useTranslation();
|
|
113
|
+
const { primaryWallet, setShowAuthFlow } = useInternalDynamicContext();
|
|
114
|
+
const { getEOAWallet } = useSmartWallets();
|
|
115
|
+
const { unlockWallet } = useWalletPassword();
|
|
116
|
+
const eoaWallet = primaryWallet && getEOAWallet(primaryWallet);
|
|
117
|
+
const wallet = eoaWallet !== null && eoaWallet !== void 0 ? eoaWallet : primaryWallet;
|
|
118
|
+
const [currentStep, setCurrentStep] = useState('current');
|
|
119
|
+
const [currentPassword, setCurrentPassword] = useState('');
|
|
120
|
+
const [newPassword, setNewPassword] = useState('');
|
|
121
|
+
const [verifyError, setVerifyError] = useState(null);
|
|
122
|
+
const [isVerifying, setIsVerifying] = useState(false);
|
|
123
|
+
const handleCurrentPasswordContinue = useCallback((password) => __awaiter(void 0, void 0, void 0, function* () {
|
|
124
|
+
if (!(wallet === null || wallet === void 0 ? void 0 : wallet.address) || !(wallet === null || wallet === void 0 ? void 0 : wallet.chain)) {
|
|
125
|
+
logger.error('No wallet address or chain available for password verification');
|
|
126
|
+
setVerifyError(t('dyn_reset_password.current.error.failed'));
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
setIsVerifying(true);
|
|
130
|
+
setVerifyError(null);
|
|
131
|
+
const success = yield unlockWallet({
|
|
132
|
+
accountAddress: wallet.address,
|
|
133
|
+
chainName: wallet.chain,
|
|
134
|
+
password,
|
|
135
|
+
});
|
|
136
|
+
setIsVerifying(false);
|
|
137
|
+
if (success) {
|
|
138
|
+
setCurrentPassword(password);
|
|
139
|
+
setCurrentStep('enter');
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
setVerifyError(t('dyn_reset_password.current.error.invalid_password'));
|
|
143
|
+
}
|
|
144
|
+
}), [wallet, unlockWallet, t]);
|
|
145
|
+
const handleCurrentPasswordBack = useCallback(() => {
|
|
146
|
+
setShowAuthFlow(false);
|
|
147
|
+
}, [setShowAuthFlow]);
|
|
148
|
+
const handleEnterContinue = useCallback((password) => {
|
|
149
|
+
setNewPassword(password);
|
|
150
|
+
setCurrentStep('confirm');
|
|
151
|
+
}, []);
|
|
152
|
+
const handleEnterBack = useCallback(() => {
|
|
153
|
+
setCurrentStep('current');
|
|
154
|
+
}, []);
|
|
155
|
+
const handleConfirmContinue = useCallback(() => {
|
|
156
|
+
setCurrentStep('success');
|
|
157
|
+
}, []);
|
|
158
|
+
const handleConfirmBack = useCallback(() => {
|
|
159
|
+
setCurrentStep('enter');
|
|
160
|
+
}, []);
|
|
161
|
+
const handleSuccess = useCallback(() => {
|
|
162
|
+
onComplete(currentPassword, newPassword);
|
|
163
|
+
}, [onComplete, currentPassword, newPassword]);
|
|
164
|
+
switch (currentStep) {
|
|
165
|
+
case 'current':
|
|
166
|
+
return (jsx(ResetPasswordCurrentView, { onContinue: handleCurrentPasswordContinue, onBack: handleCurrentPasswordBack, isLoading: isVerifying, error: verifyError }));
|
|
167
|
+
case 'enter':
|
|
168
|
+
return (jsx(SetupPasswordEnterView, { onContinue: handleEnterContinue, onBack: handleEnterBack, title: t('dyn_reset_password.enter.title'), description: t('dyn_reset_password.enter.description'), oldPassword: currentPassword }));
|
|
169
|
+
case 'confirm':
|
|
170
|
+
return (jsx(SetupPasswordConfirmView, { password: newPassword, onContinue: handleConfirmContinue, onBack: handleConfirmBack, title: t('dyn_reset_password.confirm.title'), description: t('dyn_reset_password.confirm.description'), showAcknowledgment: true }));
|
|
171
|
+
case 'success':
|
|
172
|
+
return (jsx(SetupPasswordSuccessView, { onDone: handleSuccess, title: t('dyn_reset_password.success.title'), description: t('dyn_reset_password.success.description') }));
|
|
173
|
+
default:
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export { ResetPasswordView };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ResetPasswordView } from './ResetPasswordView';
|
|
@@ -86,6 +86,7 @@ require('qrcode');
|
|
|
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 'qrcode';
|
|
|
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';
|
package/src/lib/widgets/DynamicWidget/views/SetupPasswordConfirmView/SetupPasswordConfirmView.cjs
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var reactI18next = require('react-i18next');
|
|
9
|
+
var Checkbox = require('../../../../components/Checkbox/Checkbox.cjs');
|
|
9
10
|
var Icon = require('../../../../components/Icon/Icon.cjs');
|
|
10
11
|
var IconButton = require('../../../../components/IconButton/IconButton.cjs');
|
|
11
12
|
var Input = require('../../../../components/Input/Input.cjs');
|
|
@@ -20,13 +21,16 @@ var secureAction = require('../../../../shared/assets/secure-action.cjs');
|
|
|
20
21
|
require('@dynamic-labs/iconic');
|
|
21
22
|
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
22
23
|
|
|
23
|
-
const SetupPasswordConfirmView = ({ password, onContinue, onBack, }) => {
|
|
24
|
+
const SetupPasswordConfirmView = ({ password, onContinue, onBack, title, description, showAcknowledgment = false, }) => {
|
|
24
25
|
const { t } = reactI18next.useTranslation();
|
|
25
26
|
const [confirmPassword, setConfirmPassword] = React.useState('');
|
|
26
27
|
const [showPassword, setShowPassword] = React.useState(false);
|
|
27
28
|
const [hasInteracted, setHasInteracted] = React.useState(false);
|
|
29
|
+
const [acknowledged, setAcknowledged] = React.useState(false);
|
|
28
30
|
const passwordsMatch = password === confirmPassword;
|
|
29
|
-
const isValid = passwordsMatch &&
|
|
31
|
+
const isValid = passwordsMatch &&
|
|
32
|
+
confirmPassword.length > 0 &&
|
|
33
|
+
(!showAcknowledgment || acknowledged);
|
|
30
34
|
const handlePasswordChange = React.useCallback((e) => {
|
|
31
35
|
setConfirmPassword(e.target.value);
|
|
32
36
|
setHasInteracted(true);
|
|
@@ -34,6 +38,9 @@ const SetupPasswordConfirmView = ({ password, onContinue, onBack, }) => {
|
|
|
34
38
|
const handleToggleVisibility = React.useCallback((hidden) => {
|
|
35
39
|
setShowPassword(!hidden);
|
|
36
40
|
}, []);
|
|
41
|
+
const handleAcknowledgmentChange = React.useCallback(() => {
|
|
42
|
+
setAcknowledged((prev) => !prev);
|
|
43
|
+
}, []);
|
|
37
44
|
const handleContinue = React.useCallback(() => {
|
|
38
45
|
if (isValid) {
|
|
39
46
|
onContinue();
|
|
@@ -44,9 +51,9 @@ const SetupPasswordConfirmView = ({ password, onContinue, onBack, }) => {
|
|
|
44
51
|
const matchMessage = passwordsMatch
|
|
45
52
|
? t('dyn_setup_password.confirm.match')
|
|
46
53
|
: t('dyn_setup_password.confirm.mismatch');
|
|
47
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', copykey: 'dyn_setup_password.confirm.title', children: t('dyn_setup_password.confirm.title') }) }), jsxRuntime.jsxs("div", { className: 'setup-password-confirm-view', children: [jsxRuntime.jsxs("div", { className: 'setup-password-confirm-view__body', children: [jsxRuntime.jsx("div", { className: 'setup-password-confirm-view__icon-container', children: jsxRuntime.jsx(Icon.Icon, { color: 'brand-primary', children: jsxRuntime.jsx(secureAction.ReactComponent, { width: 64, height: 64 }) }) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', copykey: 'dyn_setup_password.confirm.description', className: 'setup-password-confirm-view__description', children: t('dyn_setup_password.confirm.description') }), jsxRuntime.jsxs("div", { className: 'setup-password-confirm-view__input-container', children: [jsxRuntime.jsx(Input.Input, { id: 'setup-password-confirm-password-input', type: showPassword ? 'text' : 'password', label: t('dyn_setup_password.confirm.label'), placeholder: t('dyn_setup_password.confirm.placeholder'), value: confirmPassword, onChange: handlePasswordChange, variant: 'regular', error: !passwordsMatch && hasInteracted && confirmPassword.length > 0, suffix:
|
|
54
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', copykey: 'dyn_setup_password.confirm.title', children: title !== null && title !== void 0 ? title : t('dyn_setup_password.confirm.title') }) }), jsxRuntime.jsxs("div", { className: 'setup-password-confirm-view', children: [jsxRuntime.jsxs("div", { className: 'setup-password-confirm-view__body', children: [jsxRuntime.jsx("div", { className: 'setup-password-confirm-view__icon-container', children: jsxRuntime.jsx(Icon.Icon, { color: 'brand-primary', children: jsxRuntime.jsx(secureAction.ReactComponent, { width: 64, height: 64 }) }) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', copykey: 'dyn_setup_password.confirm.description', className: 'setup-password-confirm-view__description', children: description !== null && description !== void 0 ? description : t('dyn_setup_password.confirm.description') }), jsxRuntime.jsxs("div", { className: 'setup-password-confirm-view__input-container', children: [jsxRuntime.jsx(Input.Input, { id: 'setup-password-confirm-password-input', type: showPassword ? 'text' : 'password', label: t('dyn_setup_password.confirm.label'), placeholder: t('dyn_setup_password.confirm.placeholder'), value: confirmPassword, onChange: handlePasswordChange, variant: 'regular', error: !passwordsMatch && hasInteracted && confirmPassword.length > 0, suffix:
|
|
48
55
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
49
|
-
jsxRuntime.jsx(ToggleVisibilityButton.ToggleVisibilityButton, { initialState: true, onClick: handleToggleVisibility }) }), showMatchMessage && (jsxRuntime.jsxs("div", { className: 'setup-password-confirm-view__match-indicator', children: [jsxRuntime.jsx(Icon.Icon, { color: passwordsMatch ? 'success-1' : 'text-error', size: 'medium', children: passwordsMatch ? (jsxRuntime.jsx(checkCircle.ReactComponent, {})) : (jsxRuntime.jsx(exclamationCircle.ReactComponent, {})) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: passwordsMatch ? 'secondary' : 'error-1', children: matchMessage })] }))] })] }), jsxRuntime.jsx("div", { className: 'setup-password-confirm-view__actions', children: jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'setup-password-confirm-continue-button', onClick: handleContinue, disabled: !isValid, copykey: 'dyn_setup_password.button.continue', buttonVariant: 'brand-primary', typographyProps: {
|
|
56
|
+
jsxRuntime.jsx(ToggleVisibilityButton.ToggleVisibilityButton, { initialState: true, onClick: handleToggleVisibility }) }), showMatchMessage && (jsxRuntime.jsxs("div", { className: 'setup-password-confirm-view__match-indicator', children: [jsxRuntime.jsx(Icon.Icon, { color: passwordsMatch ? 'success-1' : 'text-error', size: 'medium', children: passwordsMatch ? (jsxRuntime.jsx(checkCircle.ReactComponent, {})) : (jsxRuntime.jsx(exclamationCircle.ReactComponent, {})) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: passwordsMatch ? 'secondary' : 'error-1', children: matchMessage })] }))] })] }), showAcknowledgment && (jsxRuntime.jsxs("label", { className: 'setup-password-confirm-view__acknowledgment', children: [jsxRuntime.jsx(Checkbox.Checkbox, { checked: acknowledged, onChange: handleAcknowledgmentChange, ariaLabel: t('dyn_reset_password.confirm.acknowledgment') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', copykey: 'dyn_reset_password.confirm.acknowledgment', children: t('dyn_reset_password.confirm.acknowledgment') })] })), jsxRuntime.jsx("div", { className: 'setup-password-confirm-view__actions', children: jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'setup-password-confirm-continue-button', onClick: handleContinue, disabled: !isValid, copykey: 'dyn_setup_password.button.continue', buttonVariant: 'brand-primary', typographyProps: {
|
|
50
57
|
color: 'inherit',
|
|
51
58
|
}, expanded: true, children: t('dyn_setup_password.button.continue') }) })] })] }));
|
|
52
59
|
};
|
package/src/lib/widgets/DynamicWidget/views/SetupPasswordConfirmView/SetupPasswordConfirmView.d.ts
CHANGED
|
@@ -3,5 +3,8 @@ export type SetupPasswordConfirmViewProps = {
|
|
|
3
3
|
password: string;
|
|
4
4
|
onContinue: () => void;
|
|
5
5
|
onBack: () => void;
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
showAcknowledgment?: boolean;
|
|
6
9
|
};
|
|
7
10
|
export declare const SetupPasswordConfirmView: FC<SetupPasswordConfirmViewProps>;
|
package/src/lib/widgets/DynamicWidget/views/SetupPasswordConfirmView/SetupPasswordConfirmView.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useCallback } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { Checkbox } from '../../../../components/Checkbox/Checkbox.js';
|
|
5
6
|
import { Icon } from '../../../../components/Icon/Icon.js';
|
|
6
7
|
import { IconButton } from '../../../../components/IconButton/IconButton.js';
|
|
7
8
|
import { Input } from '../../../../components/Input/Input.js';
|
|
@@ -16,13 +17,16 @@ import { ReactComponent as SvgSecureAction } from '../../../../shared/assets/sec
|
|
|
16
17
|
import '@dynamic-labs/iconic';
|
|
17
18
|
import '../../../../context/ViewContext/ViewContext.js';
|
|
18
19
|
|
|
19
|
-
const SetupPasswordConfirmView = ({ password, onContinue, onBack, }) => {
|
|
20
|
+
const SetupPasswordConfirmView = ({ password, onContinue, onBack, title, description, showAcknowledgment = false, }) => {
|
|
20
21
|
const { t } = useTranslation();
|
|
21
22
|
const [confirmPassword, setConfirmPassword] = useState('');
|
|
22
23
|
const [showPassword, setShowPassword] = useState(false);
|
|
23
24
|
const [hasInteracted, setHasInteracted] = useState(false);
|
|
25
|
+
const [acknowledged, setAcknowledged] = useState(false);
|
|
24
26
|
const passwordsMatch = password === confirmPassword;
|
|
25
|
-
const isValid = passwordsMatch &&
|
|
27
|
+
const isValid = passwordsMatch &&
|
|
28
|
+
confirmPassword.length > 0 &&
|
|
29
|
+
(!showAcknowledgment || acknowledged);
|
|
26
30
|
const handlePasswordChange = useCallback((e) => {
|
|
27
31
|
setConfirmPassword(e.target.value);
|
|
28
32
|
setHasInteracted(true);
|
|
@@ -30,6 +34,9 @@ const SetupPasswordConfirmView = ({ password, onContinue, onBack, }) => {
|
|
|
30
34
|
const handleToggleVisibility = useCallback((hidden) => {
|
|
31
35
|
setShowPassword(!hidden);
|
|
32
36
|
}, []);
|
|
37
|
+
const handleAcknowledgmentChange = useCallback(() => {
|
|
38
|
+
setAcknowledged((prev) => !prev);
|
|
39
|
+
}, []);
|
|
33
40
|
const handleContinue = useCallback(() => {
|
|
34
41
|
if (isValid) {
|
|
35
42
|
onContinue();
|
|
@@ -40,9 +47,9 @@ const SetupPasswordConfirmView = ({ password, onContinue, onBack, }) => {
|
|
|
40
47
|
const matchMessage = passwordsMatch
|
|
41
48
|
? t('dyn_setup_password.confirm.match')
|
|
42
49
|
: t('dyn_setup_password.confirm.mismatch');
|
|
43
|
-
return (jsxs(Fragment, { children: [jsx(ModalHeader, { leading: backButton, children: jsx(Typography, { variant: 'title', color: 'primary', copykey: 'dyn_setup_password.confirm.title', children: t('dyn_setup_password.confirm.title') }) }), jsxs("div", { className: 'setup-password-confirm-view', children: [jsxs("div", { className: 'setup-password-confirm-view__body', children: [jsx("div", { className: 'setup-password-confirm-view__icon-container', children: jsx(Icon, { color: 'brand-primary', children: jsx(SvgSecureAction, { width: 64, height: 64 }) }) }), jsx(Typography, { variant: 'body_normal', color: 'primary', copykey: 'dyn_setup_password.confirm.description', className: 'setup-password-confirm-view__description', children: t('dyn_setup_password.confirm.description') }), jsxs("div", { className: 'setup-password-confirm-view__input-container', children: [jsx(Input, { id: 'setup-password-confirm-password-input', type: showPassword ? 'text' : 'password', label: t('dyn_setup_password.confirm.label'), placeholder: t('dyn_setup_password.confirm.placeholder'), value: confirmPassword, onChange: handlePasswordChange, variant: 'regular', error: !passwordsMatch && hasInteracted && confirmPassword.length > 0, suffix:
|
|
50
|
+
return (jsxs(Fragment, { children: [jsx(ModalHeader, { leading: backButton, children: jsx(Typography, { variant: 'title', color: 'primary', copykey: 'dyn_setup_password.confirm.title', children: title !== null && title !== void 0 ? title : t('dyn_setup_password.confirm.title') }) }), jsxs("div", { className: 'setup-password-confirm-view', children: [jsxs("div", { className: 'setup-password-confirm-view__body', children: [jsx("div", { className: 'setup-password-confirm-view__icon-container', children: jsx(Icon, { color: 'brand-primary', children: jsx(SvgSecureAction, { width: 64, height: 64 }) }) }), jsx(Typography, { variant: 'body_normal', color: 'primary', copykey: 'dyn_setup_password.confirm.description', className: 'setup-password-confirm-view__description', children: description !== null && description !== void 0 ? description : t('dyn_setup_password.confirm.description') }), jsxs("div", { className: 'setup-password-confirm-view__input-container', children: [jsx(Input, { id: 'setup-password-confirm-password-input', type: showPassword ? 'text' : 'password', label: t('dyn_setup_password.confirm.label'), placeholder: t('dyn_setup_password.confirm.placeholder'), value: confirmPassword, onChange: handlePasswordChange, variant: 'regular', error: !passwordsMatch && hasInteracted && confirmPassword.length > 0, suffix:
|
|
44
51
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
45
|
-
jsx(ToggleVisibilityButton, { initialState: true, onClick: handleToggleVisibility }) }), showMatchMessage && (jsxs("div", { className: 'setup-password-confirm-view__match-indicator', children: [jsx(Icon, { color: passwordsMatch ? 'success-1' : 'text-error', size: 'medium', children: passwordsMatch ? (jsx(SvgCheckCircle, {})) : (jsx(SvgExclamationCircle, {})) }), jsx(Typography, { variant: 'body_small', color: passwordsMatch ? 'secondary' : 'error-1', children: matchMessage })] }))] })] }), jsx("div", { className: 'setup-password-confirm-view__actions', children: jsx(TypographyButton, { dataTestId: 'setup-password-confirm-continue-button', onClick: handleContinue, disabled: !isValid, copykey: 'dyn_setup_password.button.continue', buttonVariant: 'brand-primary', typographyProps: {
|
|
52
|
+
jsx(ToggleVisibilityButton, { initialState: true, onClick: handleToggleVisibility }) }), showMatchMessage && (jsxs("div", { className: 'setup-password-confirm-view__match-indicator', children: [jsx(Icon, { color: passwordsMatch ? 'success-1' : 'text-error', size: 'medium', children: passwordsMatch ? (jsx(SvgCheckCircle, {})) : (jsx(SvgExclamationCircle, {})) }), jsx(Typography, { variant: 'body_small', color: passwordsMatch ? 'secondary' : 'error-1', children: matchMessage })] }))] })] }), showAcknowledgment && (jsxs("label", { className: 'setup-password-confirm-view__acknowledgment', children: [jsx(Checkbox, { checked: acknowledged, onChange: handleAcknowledgmentChange, ariaLabel: t('dyn_reset_password.confirm.acknowledgment') }), jsx(Typography, { variant: 'body_small', color: 'secondary', copykey: 'dyn_reset_password.confirm.acknowledgment', children: t('dyn_reset_password.confirm.acknowledgment') })] })), jsx("div", { className: 'setup-password-confirm-view__actions', children: jsx(TypographyButton, { dataTestId: 'setup-password-confirm-continue-button', onClick: handleContinue, disabled: !isValid, copykey: 'dyn_setup_password.button.continue', buttonVariant: 'brand-primary', typographyProps: {
|
|
46
53
|
color: 'inherit',
|
|
47
54
|
}, expanded: true, children: t('dyn_setup_password.button.continue') }) })] })] }));
|
|
48
55
|
};
|