Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Don't require non-existent param for keygen new (#17896)
Browse files Browse the repository at this point in the history
  • Loading branch information
CriesofCarrots authored Jun 11, 2021
1 parent 0feac57 commit 22c356d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions keygen/src/keygen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ fn no_outfile_arg<'a, 'b>() -> Arg<'a, 'b> {
Arg::with_name(NO_OUTFILE_ARG.name)
.long(NO_OUTFILE_ARG.long)
.conflicts_with_all(&["outfile", "silent"])
// Require a seed phrase to avoid generating a keypair
// but having no way to get the private key
.requires("use_mnemonic")
.help(NO_OUTFILE_ARG.help)
}

Expand All @@ -121,7 +118,6 @@ impl KeyGenerationCommonArgs for App<'_, '_> {
self.arg(word_count_arg())
.arg(language_arg())
.arg(no_passphrase_arg())
.arg(no_outfile_arg())
}
}

Expand Down Expand Up @@ -395,6 +391,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
.help("Do not display seed phrase. Useful when piping output to other programs that prompt for user input, like gpg"),
)
.key_generation_common_args()
.arg(no_outfile_arg())
)
.subcommand(
SubCommand::with_name("grind")
Expand Down Expand Up @@ -450,6 +447,12 @@ fn main() -> Result<(), Box<dyn error::Error>> {
.help("Generate using a mnemonic key phrase. Expect a significant slowdown in this mode"),
)
.key_generation_common_args()
.arg(
no_outfile_arg()
// Require a seed phrase to avoid generating a keypair
// but having no way to get the private key
.requires("use_mnemonic")
)
)
.subcommand(
SubCommand::with_name("pubkey")
Expand Down

0 comments on commit 22c356d

Please sign in to comment.