From 0de08eab3bc2d5b3dc99e9245caf3ea6690aef5d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 21 Apr 2021 22:39:16 +0000 Subject: [PATCH] CLI: Make `pay` subcommand a proper alias of `transfer` (#16720) (cherry picked from commit 63957f0677415469afd454dd0cd73c92d74ef073) Co-authored-by: Trent Nelson --- 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 67eebcc119..dbe1da5580 100644 --- a/cli/src/cli.rs +++ b/cli/src/cli.rs @@ -824,7 +824,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); @@ -2039,28 +2039,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") @@ -2077,6 +2055,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)