Skip to content

Commit

Permalink
Displays transaction details with outputs in case verbose mode is ena…
Browse files Browse the repository at this point in the history
…bled
  • Loading branch information
sandipndev committed Jul 19, 2021
1 parent 378b33a commit bdedb8e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ pub struct WalletOpts {
default_value = "main"
)]
pub wallet: String,
/// Adds verbosity, returns PSBT in JSON format alongside serialized
/// Adds verbosity, returns PSBT in JSON format alongside serialized, displays expanded objects
#[structopt(name = "VERBOSE", short = "v", long = "verbose")]
pub verbose: bool,
/// Sets the descriptor to use for the external addresses
Expand Down Expand Up @@ -702,7 +702,9 @@ where
match offline_subcommand {
GetNewAddress => Ok(json!({"address": wallet.get_address(AddressIndex::New)?})),
ListUnspent => Ok(serde_json::to_value(&wallet.list_unspent()?)?),
ListTransactions => Ok(serde_json::to_value(&wallet.list_transactions(false)?)?),
ListTransactions => Ok(serde_json::to_value(
&wallet.list_transactions(wallet_opts.verbose)?,
)?),
GetBalance => Ok(json!({"satoshi": wallet.get_balance()?})),
CreateTx {
recipients,
Expand Down

0 comments on commit bdedb8e

Please sign in to comment.