extra balance getters in firo

This commit is contained in:
julian 2022-09-06 15:52:51 -06:00
parent d84cde3db6
commit 7a23cfc4d2

View file

@ -1761,6 +1761,8 @@ class FiroWallet extends CoinServiceAPI {
balances.add(
(lelantusBalance + utxosValue + _unconfirmedLelantusBalance) * price);
balances.add(utxosValue);
Logging.instance.log("balances $balances", level: LogLevel.Info);
await DB.instance.put<dynamic>(
boxName: walletId,
@ -3884,4 +3886,12 @@ class FiroWallet extends CoinServiceAPI {
return false;
}
}
Future<Decimal> availablePrivateBalance() async {
return (await balances)[0];
}
Future<Decimal> availablePublicBalance() async {
return (await balances)[4];
}
}