Skip to content

feat(account): allow pasting entire mnemonic phrase at once #25 - #29

Open
maxx-GENIUS wants to merge 3 commits into
Creit-Tech:masterfrom
maxx-GENIUS:feat/issue-25-paste-entire-mnemonic-phrase
Open

maxx-GENIUS wants to merge 3 commits into
Creit-Tech:masterfrom
maxx-GENIUS:feat/issue-25-paste-entire-mnemonic-phrase

Conversation

@maxx-GENIUS

Copy link
Copy Markdown

Summary

Resolves #25 and resolves #18 by enabling users to paste or input an entire multi-word mnemonic seed phrase at once during wallet account recovery/confirmation, while automatically normalizing casing to lowercase:

  • Multi-Word Tokenization: When �ddWord or handlePaste receives multi-word text separated by spaces, commas, or line breaks, it splits the string into individual words, normalizes each to lowercase, validates each against the BIP39 wordList, and pushes them sequentially to phraseArray.
  • Case Enforcement: Single and multi-word inputs are automatically lowercased prior to dictionary lookup, resolving user friction when mobile keyboards or clipboard snippets auto-capitalize words.
  • Paste Event Interception: Bound (paste)="handlePaste()" to the search input with preventDefault() to prevent raw multi-word strings from corrupting autocomplete state.
  • Unit Test Coverage: Added comprehensive test cases in confirm-phrase-password.component.spec.ts verifying single-word normalization, full phrase splitting, and clipboard paste handling.

Closes #25
Closes #18

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.

Account restore: allow pasting entire mnemonic phrase at once Enforce lowercase when entering seed-phrase

1 participant