]> Untitled Git - bdk-cli/commitdiff
Update BDK dependency to v0.10.0
authorrajarshimaitra <rajarshi149@gmail.com>
Thu, 26 Aug 2021 09:33:28 +0000 (15:03 +0530)
committerrajarshimaitra <rajarshi149@gmail.com>
Thu, 26 Aug 2021 09:33:28 +0000 (15:03 +0530)
Updating the BDK version creates some breaking change.

One of such change probably requires modification of BDK to expose a
new function to fetch scriptpubkey from a txid.

Used ureq version of esplora to remove async related complexities.

Cargo.toml
src/lib.rs

index 8595a3fa93b6ae8fd97da8adcb9643c3976878de..53f93771f1e807bd6ca709f893e8efe8c6894c44 100644 (file)
@@ -12,7 +12,7 @@ readme = "README.md"
 license = "MIT"
 
 [dependencies]
-bdk = { version = "^0.7", default-features = false, features = ["all-keys"]}
+bdk = { version = "0.10.0", default-features = false, features = ["all-keys"]}
 bdk-macros = "^0.4"
 structopt = "^0.3"
 serde_json = { version = "^1.0" }
@@ -32,7 +32,7 @@ default = ["cli", "repl"]
 cli = ["bdk/key-value-db", "clap", "dirs-next", "env_logger"]
 repl = ["regex", "rustyline"]
 electrum = ["bdk/electrum"]
-esplora = ["bdk/esplora"]
+esplora = ["bdk/use-esplora-ureq"]
 compiler = ["bdk/compiler"]
 async-interface = ["bdk/async-interface"]
 compact_filters = ["bdk/compact_filters"]
index ac8d6dd81572d67207cb31e681533754612b9e4a..1aa11100a45f279f1a56c644ecd9a2a94dccb1de 100644 (file)
@@ -736,9 +736,7 @@ where
             let mut tx_builder = wallet.build_tx();
 
             if send_all {
-                tx_builder
-                    .drain_wallet()
-                    .set_single_recipient(recipients[0].0.clone());
+                tx_builder.drain_wallet().drain_to(recipients[0].0.clone());
             } else {
                 tx_builder.set_recipients(recipients);
             }
@@ -797,7 +795,8 @@ where
             tx_builder.fee_rate(FeeRate::from_sat_per_vb(fee_rate));
 
             if send_all {
-                tx_builder.maintain_single_recipient()?;
+                // TODO: Find a way to get the recipient scriptpubkey to allow shrinking
+                //tx_builder.allow_shrinking()
             }
 
             if offline_signer {