diff --git a/src/subcommand/wallet/sign.rs b/src/subcommand/wallet/sign.rs index b063559ebf..0ed574878c 100644 --- a/src/subcommand/wallet/sign.rs +++ b/src/subcommand/wallet/sign.rs @@ -19,9 +19,9 @@ group( pub(crate) struct Sign { #[arg( long, - help = "Sign with either
, or ." + help = "Sign with public from address, output, or inscription id." )] - sign_with: Signer, + signer: Signer, #[arg(long, help = "Sign .")] text: Option, #[arg(long, help = "Sign contents of .")] @@ -30,7 +30,7 @@ pub(crate) struct Sign { impl Sign { pub(crate) fn run(&self, wallet: Wallet) -> SubcommandResult { - let address = match &self.sign_with { + let address = match &self.signer { Signer::Address(address) => address.clone().require_network(wallet.chain().network())?, Signer::Inscription(inscription) => Address::from_str( &wallet diff --git a/tests/wallet/sign.rs b/tests/wallet/sign.rs index 8bb6aeaa0b..01340521df 100644 --- a/tests/wallet/sign.rs +++ b/tests/wallet/sign.rs @@ -23,7 +23,7 @@ fn sign() { let text = "HelloWorld"; let sign = CommandBuilder::new(format!( - "wallet sign --sign-with {} --text {text}", + "wallet sign --signer {} --text {text}", address.clone().assume_checked(), )) .core(&core) @@ -60,7 +60,7 @@ fn sign_file() { let address = addresses.first_key_value().unwrap().0; let sign = CommandBuilder::new(format!( - "wallet sign --sign-with {} --file hello.txt", + "wallet sign --signer {} --file hello.txt", address.clone().assume_checked(), )) .write("hello.txt", "Hello World") @@ -112,12 +112,10 @@ fn sign_for_inscription() { let text = "HelloWorld"; - let sign = CommandBuilder::new(format!( - "wallet sign --sign-with {inscription} --text {text}", - )) - .core(&core) - .ord(&ord) - .run_and_deserialize_output::(); + let sign = CommandBuilder::new(format!("wallet sign --signer {inscription} --text {text}",)) + .core(&core) + .ord(&ord) + .run_and_deserialize_output::(); assert!(addresses.contains_key(&sign.address)); } @@ -141,7 +139,7 @@ fn sign_for_output() { let text = "HelloWorld"; - let sign = CommandBuilder::new(format!("wallet sign --sign-with {output} --text {text}",)) + let sign = CommandBuilder::new(format!("wallet sign --signer {output} --text {text}",)) .core(&core) .ord(&ord) .run_and_deserialize_output::();