From: Alekos Filini Date: Sat, 16 May 2020 14:48:31 +0000 (+0200) Subject: [wallet] Specify the policy branch with a map X-Git-Tag: 0.1.0-beta.1~26 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/struct.EncoderStringWriter.html?a=commitdiff_plain;h=e9d954b6761d70c156c9d2efb0100a612439835e;p=bdk-cli [wallet] Specify the policy branch with a map --- diff --git a/src/cli.rs b/src/cli.rs index 9dc37a3..3dd23c0 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,3 +1,4 @@ +use std::collections::BTreeMap; use std::str::FromStr; use clap::{App, Arg, ArgMatches, SubCommand}; @@ -110,7 +111,7 @@ pub fn make_cli_subcommands<'a, 'b>() -> App<'a, 'b> { Arg::with_name("policy") .long("policy") .value_name("POLICY") - .help("Selects which policy will be used to satisfy the descriptor") + .help("Selects which policy should be used to satisfy the descriptor") .takes_value(true) .number_of_values(1), ), @@ -252,9 +253,9 @@ where let unspendable = sub_matches .values_of("unspendable") .map(|s| s.map(|i| parse_outpoint(i).unwrap()).collect()); - let policy: Option> = sub_matches + let policy: Option<_> = sub_matches .value_of("policy") - .map(|s| serde_json::from_str::>>(&s).unwrap()); + .map(|s| serde_json::from_str::>>(&s).unwrap()); let result = wallet.create_tx( addressees,