]> Untitled Git - bdk-cli/commitdiff
ref(verbose): Drop `verbose` flag from tests
authorVihiga Tyonum <withtvpeter@gmail.com>
Wed, 24 Jun 2026 19:10:27 +0000 (20:10 +0100)
committerVihiga Tyonum <withtvpeter@gmail.com>
Wed, 8 Jul 2026 21:49:31 +0000 (22:49 +0100)
src/handlers/config.rs
src/handlers/offline.rs
src/main.rs
tests/cli.rs
tests/common/mod.rs

index f3b1772ce60337dcf63e8d6bbdc0ba4e09579c50..55649693247b59d06f26a1251402d4f2065fbb23 100644 (file)
@@ -95,7 +95,6 @@ impl AppCommand<AppContext<Init>> for SaveConfigCommand {
             network: ctx.network.to_string(),
             ext_descriptor: self.wallet_opts.ext_descriptor.clone(),
             int_descriptor: self.wallet_opts.int_descriptor.clone(),
-
             #[cfg(any(feature = "sqlite", feature = "redb"))]
             database_type: match self.wallet_opts.database_type {
                 #[cfg(feature = "sqlite")]
index 96e23cf46f7b4c8f39e6e8bcb81a3ab8799259df..fc2e0878f9ea9ad3ab6d64a486931740a4994ba7 100644 (file)
@@ -311,6 +311,8 @@ impl AppCommand<AppContext<OfflineOperations<'_>>> for CreateTxCommand {
 
         let psbt = tx_builder.finish()?;
 
+        // let psbt_base64 = BASE64_STANDARD.encode(psbt.serialize());
+
         Ok(PsbtResult::new(&psbt, Some(false)))
     }
 }
@@ -761,7 +763,7 @@ impl AppCommand<AppContext<OfflineOperations<'_>>> for CombinePsbtCommand {
                     Ok(acc)
                 })?;
 
-        Ok(PsbtResult::new(&final_psbt, None))
+        Ok(PsbtResult::new(&final_psbt, Some(false)))
     }
 }
 
index a79492e7c8a6b3aad19660c2d81d31ad455cd18e..06e3ea2469dfe4df4b02305f3b6c4f11a0e54c68 100644 (file)
@@ -29,7 +29,7 @@ use crate::handlers::{AppCommand, AppContext};
 use crate::utils::output::FormatOutput;
 use crate::utils::runtime::WalletRuntime;
 use crate::utils::{command_requires_db, prepare_home_dir};
-use clap::Parser;
+use clap::{CommandFactory, Parser};
 
 #[tokio::main]
 async fn main() {
@@ -199,8 +199,14 @@ async fn run(cli_opts: CliOpts) -> Result<(), Error> {
 
             cmd.execute(&mut ctx)?.write_out(std::io::stdout())?;
         }
-        CliSubCommand::Completions { shell: _ } => unimplemented!(),
-
+        CliSubCommand::Completions { shell } => {
+            clap_complete::generate(
+                shell,
+                &mut CliOpts::command(),
+                "bdk-cli",
+                &mut std::io::stdout(),
+            );
+        }
         #[cfg(feature = "silent-payments")]
         CliSubCommand::SilentPaymentCode(cmd) => {
             let mut ctx = AppContext::new(cli_opts.network, home_dir);
index 1e06133244a5efaad4850b4c4ee08834c0a08ad2..8f5971760e186ad9cde214117f6d6c86c84d994d 100644 (file)
@@ -552,7 +552,7 @@ mod test_offline {
         let sign_json: Value = serde_json::from_slice(&sign_output.stdout).unwrap();
         let proof = sign_json["proof"].as_str().unwrap();
 
-        // A tampered message should fail verification gracefully (valid: false)
+        // A tampered message should fail
         cli.wallet_cmd(&[
             "--wallet",
             WALLET_NAME,
index 19be69891472fdba02358024a1e06cf51f1f3e36..4322016671e39167b640d461e6f219392d7dae86 100644 (file)
@@ -19,7 +19,6 @@ use std::path::PathBuf;
 pub struct BdkCli {
     pub network: String,
     pub datadir: Option<PathBuf>,
-    pub verbosity: bool,
     pub recv_desc: Option<String>,
     pub change_desc: Option<String>,
     pub server_url: Option<String>,
@@ -31,7 +30,6 @@ impl BdkCli {
         Self {
             network: network.to_string(),
             datadir,
-            verbosity: false,
             recv_desc: None,
             change_desc: None,
             server_url: None,
@@ -48,10 +46,6 @@ impl BdkCli {
             cmd.arg("--datadir").arg(dir);
         }
 
-        if self.verbosity {
-            cmd.arg("--verbose");
-        }
-
         if let Some(url) = &self.server_url {
             cmd.arg("--server").arg(url);
         }