From 28a0449159a289c491708c2f2e446756f9b07fcf Mon Sep 17 00:00:00 2001 From: John Oshalusi Date: Mon, 9 Dec 2024 21:15:47 +0100 Subject: [PATCH] fix: resolve build issue on main --- .../generate-key-flow/EnterPassword/EnterPassword.tsx | 2 +- .../ui/components/WalletSetup/WalletSetupPasswordStep.tsx | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/core/src/shared-wallets/add-shared-wallet/generate-key-flow/EnterPassword/EnterPassword.tsx b/packages/core/src/shared-wallets/add-shared-wallet/generate-key-flow/EnterPassword/EnterPassword.tsx index 1514a71b0..439a139dc 100644 --- a/packages/core/src/shared-wallets/add-shared-wallet/generate-key-flow/EnterPassword/EnterPassword.tsx +++ b/packages/core/src/shared-wallets/add-shared-wallet/generate-key-flow/EnterPassword/EnterPassword.tsx @@ -44,7 +44,7 @@ export const EnterPassword: VFC = ({ const icon = mapOfWalletTypeIconProperties[kind]; const next = () => { - onGenerateKeys(password.value); + onGenerateKeys(password?.value || ''); clearSecrets(); }; diff --git a/packages/core/src/ui/components/WalletSetup/WalletSetupPasswordStep.tsx b/packages/core/src/ui/components/WalletSetup/WalletSetupPasswordStep.tsx index 82ad23264..f85baef17 100644 --- a/packages/core/src/ui/components/WalletSetup/WalletSetupPasswordStep.tsx +++ b/packages/core/src/ui/components/WalletSetup/WalletSetupPasswordStep.tsx @@ -60,10 +60,7 @@ export const WalletSetupPasswordStep = ({ const passwordConfirmationErrorMessage = passHasBeenValidated && password !== passwordConfirmation ? translations.noMatchPassword : ''; const isNextEnabled = Boolean( - passHasBeenValidated && - !passwordConfirmationErrorMessage && - score >= minimumPassLevelRequired && - password.value.length > 0 + passHasBeenValidated && !passwordConfirmationErrorMessage && score >= minimumPassLevelRequired && !!password.value ); const complexityBarList: BarStates = useMemo(() => getComplexityBarStateList(score), [score]); @@ -79,7 +76,7 @@ export const WalletSetupPasswordStep = ({ description={translations.description} onBack={onBack} onNext={() => { - onNext({ password: password.value }); + onNext({ password: password.value || '' }); }} isNextEnabled={isNextEnabled} currentTimelineStep={WalletTimelineSteps.WALLET_SETUP}