From a0127e63c64f1d7a93b5f1c5201544de9eaa15e1 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Mon, 4 Nov 2019 09:36:49 -0700 Subject: [PATCH] pay subcommand now accepts a keypair file for convenience (#6703) --- 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 02cbba73fc..c7a1681f24 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(