mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-12-02 20:04:40 +01:00
Add option to limit number of TXs shown (#660)
Co-authored-by: cliik <cliik@example.com>
This commit is contained in:
@@ -333,6 +333,11 @@ subcommands:
|
||||
short: t
|
||||
long: txid
|
||||
takes_value: true
|
||||
- count:
|
||||
help: Maximum number of transactions to show
|
||||
short: c
|
||||
long: count
|
||||
takes_value: true
|
||||
- post:
|
||||
about: Posts a finalized transaction to the chain
|
||||
args:
|
||||
|
||||
@@ -840,9 +840,14 @@ pub fn parse_txs_args(args: &ArgMatches) -> Result<command::TxsArgs, ParseError>
|
||||
let msg = format!("At most one of 'id' (-i) or 'txid' (-t) may be provided.");
|
||||
return Err(ParseError::ArgumentError(msg));
|
||||
}
|
||||
let count = match args.value_of("count") {
|
||||
None => None,
|
||||
Some(c) => Some(parse_u64(c, "count")? as u32),
|
||||
};
|
||||
Ok(command::TxsArgs {
|
||||
id: tx_id,
|
||||
tx_slate_id: tx_slate_id,
|
||||
count: count,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user