From 1806fe22f71fab2f7eb1ae89cb7b4af3655c95f8 Mon Sep 17 00:00:00 2001 From: Dario Anongba Varela Date: Mon, 9 Dec 2024 18:40:55 +0100 Subject: [PATCH] chore: use bdk 1.0.0-beta.5 (#6) * use bdk beta5 * revert gitignore --- Cargo.toml | 8 +++----- src/bitcoin/esplora_wallet.rs | 4 ++-- src/bitcoin/snap_wallet.rs | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 176fdc4..99e2508 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,8 +43,8 @@ getrandom = { version = "0.2.15", features = ["js"] } ring = { version = "0.17.8", features = ["wasm32_unknown_unknown_js"] } # Bitcoin dependencies -bdk_wallet = { git = "https://github.com/bitcoindevkit/bdk", branch = "master" } -bdk_esplora = { git = "https://github.com/bitcoindevkit/bdk", branch = "master", default-features = false, features = [ +bdk_wallet = { version = "1.0.0-beta.5" } +bdk_esplora = { version = "0.19", default-features = false, features = [ "async-https", ], optional = true } bitcoin = { version = "0.32.4", default-features = false } @@ -57,9 +57,7 @@ console_error_panic_hook = { version = "0.1.7", optional = true } [dev-dependencies] wasm-bindgen-test = "0.3.45" web-sys = { version = "0.3.72", features = ["console"] } -bdk_wallet = { git = "https://github.com/bitcoindevkit/bdk", branch = "master", features = [ - "keys-bip39", -] } +bdk_wallet = { version = "1.0.0-beta.5", features = ["keys-bip39"] } [profile.release] # Tell `rustc` to optimize for small code size. diff --git a/src/bitcoin/esplora_wallet.rs b/src/bitcoin/esplora_wallet.rs index 0ed66c0..2a6b488 100644 --- a/src/bitcoin/esplora_wallet.rs +++ b/src/bitcoin/esplora_wallet.rs @@ -124,7 +124,7 @@ impl EsploraWallet { .await?; let now = (Date::now() / 1000.0) as u64; - self.wallet.apply_update_at(update, now)?; + self.wallet.apply_update_at(update, Some(now))?; Ok(()) } @@ -134,7 +134,7 @@ impl EsploraWallet { let update = self.client.sync(request, parallel_requests).await?; let now = (Date::now() / 1000.0) as u64; - self.wallet.apply_update_at(update, now)?; + self.wallet.apply_update_at(update, Some(now))?; Ok(()) } diff --git a/src/bitcoin/snap_wallet.rs b/src/bitcoin/snap_wallet.rs index 932af70..5ee27c7 100644 --- a/src/bitcoin/snap_wallet.rs +++ b/src/bitcoin/snap_wallet.rs @@ -134,7 +134,7 @@ impl SnapWallet { .await?; let now = (Date::now() / 1000.0) as u64; - self.wallet.apply_update_at(update, now)?; + self.wallet.apply_update_at(update, Some(now))?; Ok(()) } @@ -144,7 +144,7 @@ impl SnapWallet { let update = self.client.sync(request, parallel_requests).await?; let now = (Date::now() / 1000.0) as u64; - self.wallet.apply_update_at(update, now)?; + self.wallet.apply_update_at(update, Some(now))?; Ok(()) }