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

Allow seed phrases with a trailing newline #6213

Merged
merged 1 commit into from
Mar 13, 2019

Conversation

whymarrh
Copy link
Contributor

@whymarrh whymarrh commented Feb 27, 2019

Refs #6134 and #5827

Take 3 🎬

This PR updates the import seed phrase screen (during on-boarding) to strip extraneous leading and trailing whitespace from the seed phrase. This adds the crucial step of using the trimmed seed phrase in the onSubmit handler.

@whymarrh whymarrh requested a review from danjm February 27, 2019 02:55
@@ -45,9 +45,11 @@ export default class ImportWithSeedPhrase extends PureComponent {
} else if (!validateMnemonic(parsedSeedPhrase)) {
seedPhraseError = this.context.t('invalidSeedPhrase')
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test failures are real failures. parsedSeedPhrase will always remove trailing white spaces, not allowing the user to type spaced words.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah totally didn't test this

Copy link
Contributor

@danjm danjm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left comment

@whymarrh
Copy link
Contributor Author

whymarrh commented Feb 27, 2019

Updated. I think the e2e failure is unrelated. Conflicts fixed. Green build. 🎉

@whymarrh whymarrh requested a review from danjm February 27, 2019 16:32
@kumavis
Copy link
Member

kumavis commented Mar 11, 2019

@whymarrh looks like conflicts popped up again

@whymarrh whymarrh force-pushed the seed-phrase-newline branch from 4c08918 to 1c9caa4 Compare March 12, 2019 14:43
@whymarrh whymarrh force-pushed the seed-phrase-newline branch from 1c9caa4 to 29a0b34 Compare March 13, 2019 12:30
@whymarrh whymarrh merged commit 7b63d4d into MetaMask:develop Mar 13, 2019
@whymarrh whymarrh deleted the seed-phrase-newline branch March 13, 2019 13:26
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.

3 participants