From 8faac03954c8edc41c60e5fe3b264df2676d4737 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 2 Jul 2024 11:46:09 -0500 Subject: [PATCH] count pending balances as valid --- .../wallet_view/sub_widgets/wallet_summary_info.dart | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/pages/wallet_view/sub_widgets/wallet_summary_info.dart b/lib/pages/wallet_view/sub_widgets/wallet_summary_info.dart index 39331ebb7..a2554fbe9 100644 --- a/lib/pages/wallet_view/sub_widgets/wallet_summary_info.dart +++ b/lib/pages/wallet_view/sub_widgets/wallet_summary_info.dart @@ -72,13 +72,18 @@ class WalletSummaryInfo extends ConsumerWidget { List getAvailableBalances(FiroWallet firoWallet) { final List availableBalances = []; - if (firoWallet.info.cachedBalanceTertiary.spendable.raw > BigInt.zero) { + if (firoWallet.info.cachedBalanceTertiary.spendable.raw > BigInt.zero || + firoWallet.info.cachedBalanceTertiary.pendingSpendable.raw > + BigInt.zero) { availableBalances.add(FiroType.spark); } - if (firoWallet.info.cachedBalanceSecondary.spendable.raw > BigInt.zero) { + if (firoWallet.info.cachedBalanceSecondary.spendable.raw > BigInt.zero || + firoWallet.info.cachedBalanceSecondary.pendingSpendable.raw > + BigInt.zero) { availableBalances.add(FiroType.lelantus); } - if (firoWallet.info.cachedBalance.spendable.raw > BigInt.zero) { + if (firoWallet.info.cachedBalance.spendable.raw > BigInt.zero || + firoWallet.info.cachedBalance.pendingSpendable.raw > BigInt.zero) { availableBalances.add(FiroType.public); } return availableBalances;