From 3fd09435af2abc275593c497032ea96396f06175 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2019 14:34:21 -0700 Subject: [PATCH] pay subcommand now accepts a keypair file for convenience (#6703) (#6706) (cherry picked from commit a0127e63c64f1d7a93b5f1c5201544de9eaa15e1) --- cli/src/cli.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/src/cli.rs b/cli/src/cli.rs index 4de53b1e59..d56f1d1e14 100644 --- a/cli/src/cli.rs +++ b/cli/src/cli.rs @@ -356,7 +356,7 @@ pub fn parse_command(matches: &ArgMatches<'_>) -> Result { let lamports = amount_of(matches, "amount", "unit").expect("Invalid amount"); - let to = value_of(&matches, "to").unwrap(); + let to = pubkey_of(&matches, "to").unwrap(); let timestamp = if matches.is_present("timestamp") { // Parse input for serde_json let date_string = if !matches.value_of("timestamp").unwrap().contains('Z') { @@ -1288,10 +1288,10 @@ pub fn app<'ab, 'v>(name: &str, about: &'ab str, version: &'v str) -> App<'ab, ' .arg( Arg::with_name("to") .index(1) - .value_name("PUBKEY") + .value_name("TO PUBKEY") .takes_value(true) .required(true) - .validator(is_pubkey) + .validator(is_pubkey_or_keypair) .help("The pubkey of recipient"), ) .arg(