Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add whitespace after tapping the suggestion text #531

Merged
merged 4 commits into from
Jan 20, 2020

Conversation

hanwencheng
Copy link
Contributor

@hanwencheng hanwencheng commented Jan 17, 2020

close #529 .

Now after tapping the suggestion text, the trailing space will be automatically added.

And for a 24 words recovery phrase, it will not add the whitespace to the end.

But for a 12, 15, 18, or 21 words (They should all be possible to be recovered), the trailing whitespace is still added, but after tapping the "Recover Identity" button and input PIN, it will automatically be trimmed.

Test cases:

  1. tapping any suggestion word, a whitespace should follow.
  2. move the cursor to middle, and add another suggestion word, no extra trailing whitespace in the end should be added.
  3. After input bip39 mnemonic phrase, the box border should not be red though there is a trailing whitespace.
  4. after input bip39 mnemonic phrase and recovered the identity, the recover phrase should not include any trailing whitespace, they should be removed during recovery process.
  5. After input 24 bip39 words, there should be no more traling whitespaces added.

src/components/AccountSeed.js Outdated Show resolved Hide resolved
src/util/account.js Outdated Show resolved Hide resolved
Co-Authored-By: Joseph Mark <sjeohp@gmail.com>
sjeohp-zz
sjeohp-zz previously approved these changes Jan 17, 2020
@hanwencheng hanwencheng merged commit 7f4703f into master Jan 20, 2020
@hanwencheng hanwencheng deleted the hanwen-seed-whitespace branch January 20, 2020 13:32
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.

Add a white space when clicking on a proposed mnemonic word
2 participants