-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Enable Passphrase for Restore Command #1669
Conversation
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.
Good idea!
Would be great to also add this functionality to ord wallet create
and write integration tests that both work. Integration tests can be found in tests/wallet/{create, restore}.rs
.
I've already done the create command changes, but have not implemented unit tests. Will try to get my work committed tonight or tomorrow on this. |
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.
This looks great!
I'll just wait for @casey to have a glance at this before merging.
src/subcommand/wallet/create.rs
Outdated
rand::thread_rng().fill_bytes(&mut entropy); | ||
#[derive(Debug, Parser)] | ||
pub(crate) struct Create { | ||
#[clap(long, default_value = "", help = "Use <PASSPHRASE> to derive wallet seed.")] |
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.
We are using the specific language of BIP 39 here.
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.
Small changes. Will merge now!
Description
Implements an option to pass a passphrase when restoring from mnemonic.
Related Issue
Closes #1671
Motivation and Context
Without this change users are only able to (easily) import a wallet from Sparrow if they did NOT use a passphrase.
How Has This Been Tested?
Default case has been verified to call to_seed() with no passphrase and all single word data passed with the option is verified to replace that. Utilizes the standardized behavior as seen in other sub-commands.