Browse Source

fix(seed checker): don't fail if the user provides more seed words than required

Previously, if the user pushed the back button after supplying a seed word,
then returned and entered the required three, the seed check would fail due to
there being more words supplied than required.
renovate/lint-staged-8.x
Ben Woosley 7 years ago
parent
commit
530784a7db
No known key found for this signature in database GPG Key ID: 6EE5F3785F78B345
  1. 2
      app/reducers/onboarding.js

2
app/reducers/onboarding.js

@ -348,7 +348,7 @@ onboardingSelectors.reEnterSeedChecker = createSelector(
seedIndexesArrSelector, seedIndexesArrSelector,
reEnterSeedInputSelector, reEnterSeedInputSelector,
(seed, seedIndexArr, reEnterSeedInput) => (seed, seedIndexArr, reEnterSeedInput) =>
seedIndexArr.length === Object.keys(reEnterSeedInput).length && Object.keys(reEnterSeedInput).length >= seedIndexArr.length &&
seedIndexArr.every( seedIndexArr.every(
index => reEnterSeedInput[index] && reEnterSeedInput[index] === seed[index - 1] index => reEnterSeedInput[index] && reEnterSeedInput[index] === seed[index - 1]
) )

Loading…
Cancel
Save