Skip to content

Commit

Permalink
CLI: Make pay subcommand a proper alias of transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
t-nelson authored and mergify[bot] committed Apr 21, 2021
1 parent ba9a502 commit 63957f0
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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")
Expand All @@ -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)
Expand Down

0 comments on commit 63957f0

Please sign in to comment.