Skip to content

Name the wrong word and suggest recovery words on phrase import - #3897

Open
muchai254 wants to merge 7 commits into
tahowallet:mainfrom
muchai254:muchai254/recovery-phrase
Open

muchai254 wants to merge 7 commits into
tahowallet:mainfrom
muchai254:muchai254/recovery-phrase

Conversation

@muchai254

Copy link
Copy Markdown

Addresses #3360

When importing a recovery phrase, a typo, an unknown word and a checksum failure all showed the same "Invalid recovery phrase" error, so it is hard for users to tell which word was wrong. This checks each word against the BIP39 English list as one type and suggests words from it.

This is behind a new flag, SUPPORT_SEED_WORD_SUGGESTIONS, which is off by default:

Features added

  • Errors name the wrong word, eg"Word 2 isn't in the recovery word list". A word is only checked once it's finished (a space, leaving the field or a paste), and Import stays disabled while any word is unknown.
  • Submit errors are split. A wrong count says how many words were entered, and a checksum failure says all words are valid but the phrase doesn't check out.
  • After 2 letters, up to 6 matching words are suggested. One can pick one with a click, or with the arrow keys and Enter or Tab. Nothing changes without a pick.
  • Screen readers hear the errors, the number of suggestions and the highlighted word.

The word list is the same one isValidMnemonic uses, taken from ethers, so no new dependency. The phrase stays in component state, therefore, no Redux, storage, analytics or logging, and browser spellcheck and autofill are off.

Underlining the wrong word inside the box is not covered in this PR.

Below is a video showing the added features when the feature flag is turned on for testing.

screen.recording.mp4

@muchai254 muchai254 changed the title Muchai254/recovery phrase Name the wrong word and suggest recovery words on phrase import Nov 13, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant