add/show spark balance where appropriate

This commit is contained in:
julian 2024-01-21 12:04:58 -06:00
parent 0e0b516ea0
commit d72e3a0d4a
4 changed files with 11 additions and 3 deletions

View file

@ -138,7 +138,7 @@ class _Step4ViewState extends ConsumerState<Step4View> {
Future<bool?> _showSendFromFiroBalanceSelectSheet(String walletId) async { Future<bool?> _showSendFromFiroBalanceSelectSheet(String walletId) async {
final coin = ref.read(pWalletCoin(walletId)); final coin = ref.read(pWalletCoin(walletId));
final balancePublic = ref.read(pWalletBalance(walletId)); final balancePublic = ref.read(pWalletBalance(walletId));
final balancePrivate = ref.read(pWalletBalanceSecondary(walletId)); final balancePrivate = ref.read(pWalletBalanceTertiary(walletId));
return await showModalBottomSheet<bool?>( return await showModalBottomSheet<bool?>(
context: context, context: context,

View file

@ -198,6 +198,11 @@ class _FavoriteCardState extends ConsumerState<FavoriteCard> {
pWalletBalanceSecondary(walletId), pWalletBalanceSecondary(walletId),
) )
.total; .total;
total += ref
.watch(
pWalletBalanceTertiary(walletId),
)
.total;
} }
Amount fiatTotal = Amount.zero; Amount fiatTotal = Amount.zero;

View file

@ -294,6 +294,7 @@ class _BalanceDisplay extends ConsumerWidget {
Amount total = ref.watch(pWalletBalance(walletId)).total; Amount total = ref.watch(pWalletBalance(walletId)).total;
if (coin == Coin.firo || coin == Coin.firoTestNet) { if (coin == Coin.firo || coin == Coin.firoTestNet) {
total += ref.watch(pWalletBalanceSecondary(walletId)).total; total += ref.watch(pWalletBalanceSecondary(walletId)).total;
total += ref.watch(pWalletBalanceTertiary(walletId)).total;
} }
return Text( return Text(

View file

@ -51,9 +51,11 @@ class _ManagedFavoriteCardState extends ConsumerState<ManagedFavorite> {
Amount total = ref.watch(pWalletBalance(walletId)).total; Amount total = ref.watch(pWalletBalance(walletId)).total;
if (coin == Coin.firo || coin == Coin.firoTestNet) { if (coin == Coin.firo || coin == Coin.firoTestNet) {
final balancePrivate = ref.watch(pWalletBalanceSecondary(walletId)); final balancePrivate =
ref.watch(pWalletBalanceSecondary(walletId)).total +
ref.watch(pWalletBalanceTertiary(walletId)).total;
total += balancePrivate.total; total += balancePrivate;
} }
final isFavourite = ref.watch(pWalletIsFavourite(walletId)); final isFavourite = ref.watch(pWalletIsFavourite(walletId));