-
-
Notifications
You must be signed in to change notification settings - Fork 650
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
Conversation
@@ -17,7 +18,7 @@ interface Validated { | |||
} | |||
|
|||
function validatePkeyAndPass(pkey: string, pass: string): Validated { | |||
const fixedPkey = stripHexPrefix(pkey); | |||
const fixedPkey = stripHexPrefix(pkey).trim(); |
There was a problem hiding this comment.
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.
There was a problem hiding this 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!
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)
Private Key (Visible Textarea)
Mnemonic (Hidden Password)
Mnemonic (Visible Textarea)