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

Passwordify Private Key & Mnemonic Inputs #925

Merged
merged 7 commits into from
Jan 26, 2018
Merged

Conversation

wbobeirne
Copy link
Contributor

Ticks off another box from #557. Converts the private key and mnemonic phrase inputs into passwords. However, because a user may want to verify them if the input is invalid, I've added the ability to toggle them into their former textareas. Since we use this functionality in a lot of places (Generate keystore wallet, wallet info tab, recreate keystore file modal) I went ahead and made a TogglablePassword component and converted all instances of this to use the shared component.

Screenshots

Private Key (Hidden Password)

screen shot 2018-01-25 at 6 37 33 pm

Private Key (Visible Textarea)

screen shot 2018-01-25 at 6 37 40 pm

Mnemonic (Hidden Password)

screen shot 2018-01-25 at 6 37 53 pm

Mnemonic (Visible Textarea)

screen shot 2018-01-25 at 6 38 00 pm

@wbobeirne wbobeirne requested a review from dternyak January 25, 2018 23:41
@wbobeirne wbobeirne mentioned this pull request Jan 25, 2018
2 tasks
@@ -17,7 +18,7 @@ interface Validated {
}

function validatePkeyAndPass(pkey: string, pass: string): Validated {
const fixedPkey = stripHexPrefix(pkey);
const fixedPkey = stripHexPrefix(pkey).trim();
Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps the trim should happen in stripHexPrefix? A minor opinionated nitpick.

Copy link
Contributor

@dternyak dternyak left a comment

Choose a reason for hiding this comment

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

Minor comment that can be addressed separately.

Nice DRY improvements as well!

@dternyak dternyak merged commit 7fe2888 into develop Jan 26, 2018
@dternyak dternyak deleted the password-inputs branch January 26, 2018 22:11
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.

2 participants