Skip to content

Commit

Permalink
fix: resolve build issue on main
Browse files Browse the repository at this point in the history
  • Loading branch information
greatertomi committed Dec 10, 2024
1 parent 6650980 commit f3a977c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ export const EnterPassword: VFC<EnterPasswordProps> = ({
const icon = mapOfWalletTypeIconProperties[kind];

const next = () => {
if (!password.value) {
console.error('Password is undefined');
return;
}

onGenerateKeys(password.value);
clearSecrets();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ 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
? password.value.length > 0
: false
);

const complexityBarList: BarStates = useMemo(() => getComplexityBarStateList(score), [score]);
Expand All @@ -79,7 +78,7 @@ export const WalletSetupPasswordStep = ({
description={translations.description}
onBack={onBack}
onNext={() => {
onNext({ password: password.value });
password.value ? onNext({ password: password.value }) : console.error('Password is undefined');
}}
isNextEnabled={isNextEnabled}
currentTimelineStep={WalletTimelineSteps.WALLET_SETUP}
Expand Down

0 comments on commit f3a977c

Please sign in to comment.