Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
fix: force lowercase seedphrase input
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Dec 22, 2020
1 parent 3046f37 commit 6c47ae4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/pages/onboarding/03-restore-wallet/restore-wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ export const RestoreWallet: React.FC = () => {
return;
}

if (!validateMnemonic(mnemonic)) {
const parsedMnemonic = mnemonic.toLowerCase().trim();

if (!validateMnemonic(parsedMnemonic)) {
setError('Not a valid bip39 mnemonic');
return;
}
dispatch(persistMnemonic(mnemonic.trim()));
dispatch(persistMnemonic(parsedMnemonic));
history.push(routes.SET_PASSWORD);
};

Expand Down

0 comments on commit 6c47ae4

Please sign in to comment.