mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-26 00:55:02 +01:00
feat(bindings): wallet total balance
This commit is contained in:
@@ -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)?;
|
||||
|
||||
Reference in New Issue
Block a user