Skip to content

Commit

Permalink
[wallet] Fix clap commands (MystenLabs#1334)
Browse files Browse the repository at this point in the history
- Fix multiple values issue caused by MystenLabs#1312
  • Loading branch information
tnowacki authored Apr 12, 2022
1 parent 206f9e8 commit 147b3b1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions sui/src/wallet_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,16 @@ pub enum WalletCommands {
#[clap(long)]
function: Identifier,
/// Function name in module
#[clap(long, parse(try_from_str = parse_type_tag))]
#[clap(
long,
parse(try_from_str = parse_type_tag),
multiple_occurrences = false,
multiple_values = true
)]
type_args: Vec<TypeTag>,
/// Simplified ordered args like in the function syntax
/// ObjectIDs, Addresses must be hex strings
#[clap(long)]
#[clap(long, multiple_occurrences = false, multiple_values = true)]
args: Vec<SuiJsonValue>,
/// ID of the gas object for gas payment, in 20 bytes Hex string
#[clap(long)]
Expand Down Expand Up @@ -168,7 +173,7 @@ pub enum WalletCommands {
#[clap(long)]
coin_id: ObjectID,
/// Amount to split out from the coin
#[clap(long)]
#[clap(long, multiple_occurrences = false, multiple_values = true)]
amounts: Vec<u64>,
/// ID of the gas object for gas payment, in 20 bytes Hex string
/// If not provided, a gas object with at least gas_budget value will be selected
Expand Down

0 comments on commit 147b3b1

Please sign in to comment.