]> Untitled Git - bdk-cli/commitdiff
feat(sp): fix command_requires_db fn match arm
authorVihiga Tyonum <withtvpeter@gmail.com>
Sun, 5 Jul 2026 02:37:46 +0000 (03:37 +0100)
committerVihiga Tyonum <withtvpeter@gmail.com>
Tue, 7 Jul 2026 12:10:14 +0000 (13:10 +0100)
src/handlers/descriptor.rs
src/handlers/online.rs
src/handlers/repl.rs
src/utils/common.rs

index 1c949cdf283c0877b21984e18f3a39f222b22179..e52863a81f53710b838369dbdf6a1dd28748df03 100644 (file)
@@ -112,9 +112,10 @@ impl AppCommand<AppContext<Init>> for CompileCommand {
                     .map_err(|e| Error::Generic(format!("Invalid NUMS key: {e}")))?;
                 let nums_point = PublicKey::from_x_only_public_key(nums_key, Parity::Even);
 
-                let internal_key_point = nums_point
-                    .add_exp_tweak(&secp, &Scalar::from(r_secret))
-                    .map_err(|e| Error::Generic(format!("Failed to tweak NUMS key: {e}")))?;
+                let internal_key_point =
+                    nums_point
+                        .add_exp_tweak(&secp, &Scalar::from(r_secret))
+                        .map_err(|e| Error::Generic(format!("Failed to tweak NUMS key: {e}")))?;
                 let (xonly_internal_key, _) = internal_key_point.x_only_public_key();
 
                 let tree = TapTree::Leaf(Arc::new(taproot_policy));
index 885fd615118c9bf50de1cdc544f9571f1c5e5990..f520451e13e5275b23b97c3c9bf3fbb99914443c 100644 (file)
@@ -16,6 +16,8 @@ use {
 #[cfg(any(feature = "electrum", feature = "esplora"))]
 use {bdk_wallet::KeychainKind, std::collections::HashSet, std::io::Write};
 
+#[cfg(any(feature = "electrum", feature = "esplora", feature = "rpc"))]
+use crate::utils::print_wallet_events;
 #[cfg(any(
     feature = "electrum",
     feature = "esplora",
@@ -35,8 +37,6 @@ use {
         consensus::Decodable, hex::FromHex,
     },
 };
-#[cfg(any(feature = "electrum", feature = "esplora", feature = "rpc"))]
-use crate::utils::print_wallet_events;
 #[cfg(any(
     feature = "electrum",
     feature = "esplora",
index a93b2f563c1a682533ab299c4fe39c59ec415c7a..c2a5ae85270b158d24de3b9d232665c07193e290 100644 (file)
@@ -7,11 +7,14 @@ use {
     clap::Parser,
 };
 
-#[cfg(any(
-    feature = "electrum",
-    feature = "esplora",
-    feature = "rpc",
-    feature = "cbf"
+#[cfg(all(
+    feature = "repl",
+    any(
+        feature = "electrum",
+        feature = "esplora",
+        feature = "rpc",
+        feature = "cbf"
+    )
 ))]
 use crate::client::BlockchainClient;
 #[cfg(feature = "repl")]
index 4a2fad5ccffe57cf8a28ec82e0dbe551a1514dcb..8a4089ab355394b20ab3b7aaad217c29b4334a59 100644 (file)
@@ -5,6 +5,7 @@ use bdk_bip322::SignatureFormat;
 use bdk_kyoto::{Info, Receiver, UnboundedReceiver, Warning};
 #[cfg(feature = "silent-payments")]
 use bdk_sp::encoding::SilentPaymentCode;
+use bdk_wallet::bitcoin::{Address, Network, OutPoint, ScriptBuf};
 #[cfg(any(
     feature = "electrum",
     feature = "esplora",
@@ -12,7 +13,6 @@ use bdk_sp::encoding::SilentPaymentCode;
     feature = "rpc"
 ))]
 use bdk_wallet::{bitcoin::Psbt, event::WalletEvent};
-use bdk_wallet::bitcoin::{Address, Network, OutPoint, ScriptBuf};
 
 use crate::commands::OfflineWalletSubCommand;
 use std::{
@@ -240,9 +240,9 @@ pub fn command_requires_db(command: &OfflineWalletSubCommand) -> bool {
         OfflineWalletSubCommand::SignMessage(_) => true,
 
         #[cfg(feature = "bip322")]
-        OfflineWalletSubCommand::VerifyMessage(_) => false,
+        OfflineWalletSubCommand::VerifyMessage(_) => true,
         #[cfg(feature = "silent-payments")]
-        OfflineWalletSubCommand::CreateSpTx(_) => false,
+        OfflineWalletSubCommand::CreateSpTx(_) => true,
     }
 }