]> Untitled Git - bdk-cli/commitdiff
Displays transaction details with outputs in case verbose mode is enabled
authorSandipan Dey <hey@sandipan.dev>
Mon, 19 Jul 2021 17:12:44 +0000 (22:42 +0530)
committerSteve Myers <steve@notmandatory.org>
Thu, 12 Aug 2021 13:32:37 +0000 (15:32 +0200)
src/lib.rs

index 7a3e55142324a82e8804a99653487044c46d7481..af54e8e3f7da2a6a17d84076a6f4ee8ee107c85a 100644 (file)
@@ -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
@@ -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,