MetaMask / MetaMask/metamask-mobile

[Bug] Incorrect Validation Error for 3-Letter BIP-39 Words During SRP Entry

Open
#17,650 0 comments 0 reactions 0 assignees View on GitHub
INVALID-ISSUE-TEMPLATE
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

## Issue Description:

When restoring a wallet using a Secret Recovery Phrase (SRP) on MetaMask Mobile, a validation error incorrectly appears after entering any valid 3-letter BIP-39 word, but only after successfully entering the first word. Additionally, this validation error persists and does not disappear when the user continues typing the correct word.

### Current Behavior:

* Entering a valid 3-letter BIP-39 word (e.g., "act") after the first SRP word triggers an immediate validation error.
* This validation error persists even as the user adds additional letters, creating confusion and disrupting the recovery process.

### Expected Behavior:

* Validation errors should not trigger prematurely for valid 3-letter BIP-39 words.
* Any validation error displayed should immediately clear as the user types the correct additional letters.

### Steps to Reproduce:

1. Open MetaMask Mobile and start the wallet import flow using SRP.
2. Successfully input the first BIP-39 word.
3. Begin typing a valid 3-letter BIP-39 word as the next word in the sequence.
4. Notice an incorrect validation error appears and remains even after continuing to type the correct letters.

### Environment:

* MetaMask Mobile version: 7.52.0
* OS: Android

### Suggested Solution:

* Adjust the validation logic to recognize valid BIP-39 words correctly at any character length, especially at the minimum valid length (3 letters).
* Ensure real-time clearing of validation errors when users continue to type correct letters.

### Additional Context:

Flagged during recent UAT sessions, significantly impacting wallet restoration UX.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in the MetaMask Mobile SRP wallet-import flow on Android using a valid three-letter BIP-39 word after the first word. Trace the validation logic used during SRP entry and verify that errors do not appear prematurely and clear as the user continues typing the correct word.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.