From 31a8084c0149bf177c54ce9d84e79043e40c130d Mon Sep 17 00:00:00 2001 From: odb366 Date: Thu, 28 Jun 2018 22:49:56 +0300 Subject: [PATCH] fix(onboarding-password-bug): add more password validation --- app/components/Onboarding/Onboarding.js | 7 +++---- app/reducers/onboarding.js | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/components/Onboarding/Onboarding.js b/app/components/Onboarding/Onboarding.js index 9417f3c5..63c64a2d 100644 --- a/app/components/Onboarding/Onboarding.js +++ b/app/components/Onboarding/Onboarding.js @@ -124,13 +124,12 @@ const Onboarding = ({ back={null} next={() => { // dont allow the user to move on if the confirmation password doesnt match the original password - if (newWalletPasswordProps.showCreateWalletPasswordConfirmationError) { - return - } // if the password is less than 8 characters or empty dont allow users to proceed if ( newWalletPasswordProps.passwordMinCharsError || - !newWalletPasswordProps.createWalletPassword + !newWalletPasswordProps.createWalletPassword || + !newWalletPasswordProps.createWalletPasswordConfirmation || + newWalletPasswordProps.showCreateWalletPasswordConfirmationError ) { return } diff --git a/app/reducers/onboarding.js b/app/reducers/onboarding.js index e03e1ffd..56245f82 100644 --- a/app/reducers/onboarding.js +++ b/app/reducers/onboarding.js @@ -340,7 +340,7 @@ onboardingSelectors.passwordMinCharsError = createSelector( onboardingSelectors.showCreateWalletPasswordConfirmationError = createSelector( createWalletPasswordSelector, createWalletPasswordConfirmationSelector, - (pass1, pass2) => pass1 !== pass2 && pass2.length >= pass1.length + (pass1, pass2) => pass1 !== pass2 && pass2.length > 0 ) onboardingSelectors.showAezeedPasswordConfirmationError = createSelector(