Skip to content

Commit

Permalink
feat(bindings): wallet total balance
Browse files Browse the repository at this point in the history
  • Loading branch information
thesimplekid committed May 10, 2024
1 parent f7b79e9 commit 2671c92
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bindings/cdk-js/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ impl JsWallet {
Wallet::new(client, Arc::new(db), None).await.into()
}

#[wasm_bindgen(js_name = totalBalance)]
pub async fn total_balance(&self) -> Result<JsAmount> {
Ok(self.inner.total_balance().await.map_err(into_err)?.into())
}

#[wasm_bindgen(js_name = mintBalances)]
pub async fn mint_balances(&self) -> Result<JsValue> {
let mint_balances = self.inner.mint_balances().await.map_err(into_err)?;
Expand Down

0 comments on commit 2671c92

Please sign in to comment.