Skip to content

Commit

Permalink
add to wallet as well
Browse files Browse the repository at this point in the history
  • Loading branch information
darioAnongba committed Dec 11, 2024
1 parent 8977894 commit 22037da
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/bitcoin/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use wasm_bindgen::{prelude::wasm_bindgen, JsError, JsValue};
use crate::{
bitcoin::{seed_to_descriptor, xpriv_to_descriptor, xpub_to_descriptor},
result::JsResult,
types::{AddressInfo, AddressType, Balance, KeychainKind, Network},
types::{AddressInfo, AddressType, Balance, CheckPoint, KeychainKind, Network},
};

#[wasm_bindgen]
Expand Down Expand Up @@ -136,6 +136,10 @@ impl Wallet {
.collect()
}

pub fn latest_checkpoint(&self) -> CheckPoint {
self.wallet.latest_checkpoint().into()
}

pub fn take_staged(&mut self) -> JsResult<JsValue> {
match self.wallet.take_staged() {
Some(changeset) => Ok(to_value(&changeset)?),
Expand Down

0 comments on commit 22037da

Please sign in to comment.