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

Import pre-existing seed phrase during Onboarding #356

Merged
merged 4 commits into from
Oct 24, 2022
Merged

Conversation

kautukkundan
Copy link
Contributor

What is this PR doing?

Adds ability to use existing seed phrase during wallet generation
Screenshot 2022-10-16 at 9 01 14 PM

How can these changes be manually tested?

pull latest version, remove older extension, import again, use any seed

Does this PR resolve or contribute to any issues?

closes #318

Checklist

  • I have manually tested these changes
  • Post a link to the PR in the group chat

Guidelines

  • If your PR is not ready, mark it as a draft
  • The resolve conversation button is for reviewers, not authors
    • (But add a 'done' comment or similar)

@github-actions github-actions bot added the extension Browser extension related label Oct 16, 2022
Comment on lines 21 to 24
const split = m.split(' ');
if (split.length === 12) {
setMnemonic(split);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. We should display some sort of error message in the UI if the mnemonic is not valid, and not allow the user to set it
  2. You should be able to use ethers.Wallet.fromMnemonic to validate it is correct (I assume it throws an error), rather than just doing the length check. This will ensure it has the correct words from the language list (english for now) as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated in 8f17aa9

The set mnemonic button won't show and an error message will pop-up if the words aren't compatible with BIP-39 standard.

Screenshot 2022-10-23 at 11 22 36 PM

@kautukkundan kautukkundan force-pushed the existing-seed branch 2 times, most recently from ca57a34 to 0904d81 Compare October 20, 2022 14:23
@jacque006 jacque006 merged commit b8ae335 into main Oct 24, 2022
@jacque006 jacque006 deleted the existing-seed branch October 24, 2022 20:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extension Browser extension related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recover wallet from secret phrase
2 participants