mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-02-28 05:50:15 +00:00
count pending balances as valid
This commit is contained in:
parent
a69cc80e61
commit
8faac03954
1 changed files with 8 additions and 3 deletions
|
@ -72,13 +72,18 @@ class WalletSummaryInfo extends ConsumerWidget {
|
||||||
|
|
||||||
List<FiroType> getAvailableBalances(FiroWallet firoWallet) {
|
List<FiroType> getAvailableBalances(FiroWallet firoWallet) {
|
||||||
final List<FiroType> availableBalances = [];
|
final List<FiroType> 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);
|
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);
|
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);
|
availableBalances.add(FiroType.public);
|
||||||
}
|
}
|
||||||
return availableBalances;
|
return availableBalances;
|
||||||
|
|
Loading…
Reference in a new issue