refactor: improve docs, cleanup unnecessary types and improve code

This commit is contained in:
Vladimir Fomene
2023-09-06 09:47:45 +03:00
parent 4104206980
commit d43ae0231f
11 changed files with 175 additions and 169 deletions

View File

@@ -2,7 +2,7 @@ use std::{io::Write, str::FromStr};
use bdk::{
bitcoin::{Address, Network},
wallet::{AddressIndex, WalletUpdate},
wallet::{AddressIndex, Update},
SignOptions, Wallet,
};
use bdk_esplora::{esplora_client, EsploraAsyncExt};
@@ -58,7 +58,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.await?;
let missing_heights = wallet.tx_graph().missing_heights(wallet.local_chain());
let chain_update = client.update_local_chain(prev_tip, missing_heights).await?;
let update = WalletUpdate {
let update = Update {
last_active_indices,
graph: update_graph,
chain: Some(chain_update),