From 1806fe22f71fab2f7eb1ae89cb7b4af3655c95f8 Mon Sep 17 00:00:00 2001 From: Dario Anongba Varela Date: Mon, 9 Dec 2024 18:40:55 +0100 Subject: [PATCH 1/2] 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(()) } From 5f33b9c880b1f2ed6c109dc1ee3bb1de6ae1d223 Mon Sep 17 00:00:00 2001 From: Dario Anongba Varela Date: Mon, 9 Dec 2024 18:40:56 +0100 Subject: [PATCH 2/2] remove workspace specific fodlers (#8) --- .cargo/config.toml | 3 --- .gitignore | 1 + .vscode/settings.json | 8 -------- 3 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 .cargo/config.toml delete mode 100644 .vscode/settings.json diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index 9e85f77..0000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,3 +0,0 @@ -[env] -AR = "/opt/homebrew/opt/llvm/bin/llvm-ar" -CC = "/opt/homebrew/opt/llvm/bin/clang" diff --git a/.gitignore b/.gitignore index cfd8b1e..f55087a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ Cargo.lock .idea *.swp .cargo +.npmrc bin/ pkg/ diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 13c062f..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "rust-analyzer.server.extraEnv": { - "AR": "/opt/homebrew/opt/llvm/bin/llvm-ar", - "CC": "/opt/homebrew/opt/llvm/bin/clang" - }, - "rust-analyzer.cargo.target": "wasm32-unknown-unknown", - "rust-analyzer.cargo.features": "all" -} \ No newline at end of file