Skip to content

Commit b6d050f

Browse files
committed
drop verbose flag
1 parent e86b45b commit b6d050f

4 files changed

Lines changed: 6 additions & 20 deletions

File tree

src/commands.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,6 @@ pub struct WalletOpts {
230230
/// Selects the wallet to use.
231231
#[arg(skip)]
232232
pub wallet: Option<String>,
233-
/// Adds verbosity, returns PSBT in JSON format alongside serialized, displays expanded objects.
234-
#[arg(env = "VERBOSE", short = 'v', long = "verbose")]
235-
pub verbose: bool,
236233
/// Sets the descriptor to use for the external addresses.
237234
#[arg(env = "EXT_DESCRIPTOR", short = 'e', long, required = true)]
238235
pub ext_descriptor: String,

src/config.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ impl TryFrom<&WalletConfigInner> for WalletOpts {
117117

118118
Ok(WalletOpts {
119119
wallet: Some(config.wallet.clone()),
120-
verbose: false,
121120
ext_descriptor: config.ext_descriptor.clone(),
122121
int_descriptor: config.int_descriptor.clone(),
123122

src/handlers/offline.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,7 @@ impl AppCommand<AppContext<OfflineOperations<'_>>> for CreateTxCommand {
311311

312312
let psbt = tx_builder.finish()?;
313313

314-
// let psbt_base64 = BASE64_STANDARD.encode(psbt.serialize());
315-
316-
Ok(PsbtResult::new(&psbt, false, Some(false)))
314+
Ok(PsbtResult::new(&psbt, Some(false)))
317315
}
318316
}
319317

@@ -604,7 +602,7 @@ impl AppCommand<AppContext<OfflineOperations<'_>>> for BumpFeeCommand {
604602

605603
// let psbt_base64 = BASE64_STANDARD.encode(psbt.serialize());
606604

607-
Ok(PsbtResult::new(&psbt, false, Some(false)))
605+
Ok(PsbtResult::new(&psbt, Some(false)))
608606
}
609607
}
610608

@@ -672,7 +670,7 @@ impl AppCommand<AppContext<OfflineOperations<'_>>> for SignCommand {
672670
..Default::default()
673671
};
674672
let finalized = wallet.sign(&mut psbt, signopt)?;
675-
Ok(PsbtResult::new(&psbt, false, Some(finalized)))
673+
Ok(PsbtResult::new(&psbt, Some(finalized)))
676674
}
677675
}
678676

@@ -728,7 +726,7 @@ impl AppCommand<AppContext<OfflineOperations<'_>>> for FinalizePsbtCommand {
728726

729727
let finalized = wallet.finalize_psbt(&mut psbt, signopt)?;
730728

731-
Ok(PsbtResult::new(&psbt, false, Some(finalized)))
729+
Ok(PsbtResult::new(&psbt, Some(finalized)))
732730
}
733731
}
734732

@@ -763,7 +761,7 @@ impl AppCommand<AppContext<OfflineOperations<'_>>> for CombinePsbtCommand {
763761
Ok(acc)
764762
})?;
765763

766-
Ok(PsbtResult::new(&final_psbt, false, None))
764+
Ok(PsbtResult::new(&final_psbt, None))
767765
}
768766
}
769767

src/utils/types.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,13 @@ pub struct PsbtResult {
7878

7979
#[serde(skip_serializing_if = "Option::is_none")]
8080
pub is_finalized: Option<bool>,
81-
82-
#[serde(skip_serializing_if = "Option::is_none")]
83-
pub details: Option<serde_json::Value>,
8481
}
8582

8683
impl PsbtResult {
87-
pub fn new(psbt: &Psbt, verbose: bool, finalized: Option<bool>) -> Self {
84+
pub fn new(psbt: &Psbt, finalized: Option<bool>) -> Self {
8885
Self {
8986
psbt: bdk_wallet::bitcoin::base64::prelude::BASE64_STANDARD.encode(psbt.serialize()),
9087
is_finalized: finalized,
91-
details: if verbose {
92-
Some(serde_json::to_value(psbt).unwrap_or_default())
93-
} else {
94-
None
95-
},
9688
}
9789
}
9890
}

0 commit comments

Comments
 (0)