Skip to content

Commit be3e63c

Browse files
committed
chore: bump bdk electrum to 0.24.0
1 parent 13ab6db commit be3e63c

3 files changed

Lines changed: 85 additions & 9 deletions

File tree

bdk-ffi/Cargo.lock

Lines changed: 80 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bdk-ffi/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ path = "uniffi-bindgen.rs"
1717
[dependencies]
1818
bdk_wallet = { version = "=3.0.0", features = ["all-keys", "keys-bip39", "rusqlite"] }
1919
bdk_esplora = { version = "0.22.1", default-features = false, features = ["std", "blocking", "blocking-https-rustls"] }
20-
bdk_electrum = { version = "0.23.2", default-features = false, features = ["use-rustls-ring"] }
20+
bdk_electrum = { version = "0.24.0", default-features = false, features = ["use-rustls-ring"] }
2121
bdk_kyoto = { version = "0.17.0" }
2222

2323
uniffi = { version = "=0.31.1", features = ["cli"]}

bdk-ffi/src/electrum.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use bdk_wallet::bitcoin::hex::{Case, DisplayHex};
1919
use std::collections::BTreeMap;
2020
use std::convert::TryFrom;
2121
use std::sync::Arc;
22+
use std::time::Duration;
2223

2324
/// Wrapper around an electrum_client::ElectrumApi which includes an internal in-memory transaction
2425
/// cache to avoid re-fetching already downloaded transactions.
@@ -29,7 +30,7 @@ pub struct ElectrumClient(BdkBdkElectrumClient<bdk_electrum::electrum_client::Cl
2930
impl ElectrumClient {
3031
/// Creates a new bdk client from a electrum_client::ElectrumApi
3132
/// Optional: Set the proxy of the builder
32-
/// Optional: Set the timeout of the builder
33+
/// Optional: Set the timeout (in seconds) of the builder
3334
/// Optional: Set the retry attempts number of the builder
3435
/// Optional: Set whether the server's TLS certificate is validated.
3536
#[uniffi::constructor(default(socks5 = None, timeout = None, retry = None, validate_domain = true))]
@@ -43,7 +44,7 @@ impl ElectrumClient {
4344
let mut config = bdk_electrum::electrum_client::ConfigBuilder::new();
4445
config = config.validate_domain(validate_domain);
4546
if let Some(timeout) = timeout {
46-
config = config.timeout(Some(timeout));
47+
config = config.timeout(Some(Duration::from_secs(timeout.into())));
4748
}
4849
if let Some(retry) = retry {
4950
config = config.retry(retry);
@@ -179,7 +180,7 @@ impl ElectrumClient {
179180
pub fn estimate_fee(&self, number: u64) -> Result<f64, ElectrumError> {
180181
self.0
181182
.inner
182-
.estimate_fee(number as usize)
183+
.estimate_fee(number as usize, None)
183184
.map_err(ElectrumError::from)
184185
}
185186

0 commit comments

Comments
 (0)