From 63957f0677415469afd454dd0cd73c92d74ef073 Mon Sep 17 00:00:00 2001 From: Trent Nelson Date: Wed, 21 Apr 2021 13:19:10 -0600 Subject: [PATCH] CLI: Make `pay` subcommand a proper alias of `transfer` --- cli/src/cli.rs | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/cli/src/cli.rs b/cli/src/cli.rs index 32616a115e..8840aa4914 100644 --- a/cli/src/cli.rs +++ b/cli/src/cli.rs @@ -850,7 +850,7 @@ pub fn parse_command( signers: vec![], }) } - ("pay", Some(matches)) | ("transfer", Some(matches)) => { + ("transfer", Some(matches)) => { let amount = SpendAmount::new_from_matches(matches, "amount"); let to = pubkey_of_signer(matches, "to", wallet_manager)?.unwrap(); let sign_only = matches.is_present(SIGN_ONLY_ARG.name); @@ -2155,28 +2155,6 @@ pub fn app<'ab, 'v>(name: &str, about: &'ab str, version: &'v str) -> App<'ab, ' .help("Use the designated program id, even if the account already holds a large balance of SOL") ), ) - .subcommand( - SubCommand::with_name("pay") - .about("Deprecated alias for the transfer command") - .arg( - pubkey!(Arg::with_name("to") - .index(1) - .value_name("RECIPIENT_ADDRESS") - .required(true), - "The account address of recipient. "), - ) - .arg( - Arg::with_name("amount") - .index(2) - .value_name("AMOUNT") - .takes_value(true) - .validator(is_amount_or_all) - .required(true) - .help("The amount to send, in SOL; accepts keyword ALL"), - ) - .offline_args() - .nonce_args(false) - ) .subcommand( SubCommand::with_name("resolve-signer") .about("Checks that a signer is valid, and returns its specific path; useful for signers that may be specified generally, eg. usb://ledger") @@ -2193,6 +2171,7 @@ pub fn app<'ab, 'v>(name: &str, about: &'ab str, version: &'v str) -> App<'ab, ' .subcommand( SubCommand::with_name("transfer") .about("Transfer funds between system accounts") + .alias("pay") .arg( pubkey!(Arg::with_name("to") .index(1)