MetaMask / MetaMask/metamask-extension

Make seed phrase restore more tolerant

Open
#2,893 4 comments 1 reaction 0 assignees View on GitHub
area-seedPhrase needs-design type-enhancement
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

To address issues like #2617.

We would just need to process/spellcheck on this line, before restoring:
https://github.com/MetaMask/metamask-extension/blob/60e61e6834a4502fcd9d19e1417725c301c79a13/app/scripts/metamask-controller.js#L472

We already have two seed phrase processing modules that could be called right there:
https://www.npmjs.com/package/hd-seed-phrase-guesser
https://www.npmjs.com/package/recover-bip39

The recover module is more trivial and is ready to implement immediately. The guesser is more sophisticated and might require design.

Acceptance Criteria: Phase 1
- [ ] During seed phrase import, run a seed phrase through the recover-bip39 function in case the user used concatenated seed words.
- [ ] If the seed phrase is invalid, run it through the guesser to see if a valid phrase can be identified.

Acceptance Criteria: Phase 2
- [ ] During onboarding flow, the user gets an opportunity to say "this is not the account I expected to recover", which will initiate the guesser module, and attempt to recover a valid account.

Contributor guide

Open the contributing guide

Research direction

Read app/scripts/metamask-controller.js at the linked restore call, then review the recover-bip39 and hd-seed-phrase-guesser modules. Phase 1 is done when import handles concatenated words and sends invalid phrases to the guesser; Phase 2 also requires an onboarding choice for an unexpected account and a recovery attempt.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.