From 43bca4cf34bd3a41f153f14df2aca85a7079777c Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 24 Nov 2023 14:30:28 -0600 Subject: [PATCH] more firo balance ui fixes --- .../wallet_view/sub_widgets/desktop_send.dart | 35 ++++--------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart index f03aca4f0..7cd3782e1 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart @@ -688,34 +688,14 @@ class _DesktopSendState extends ConsumerState { Future sendAllTapped() async { final info = ref.read(pWalletInfo(walletId)); - if (coin == Coin.firo || coin == Coin.firoTestNet) { - if (ref.read(publicPrivateBalanceStateProvider.state).state == - "Private") { - cryptoAmountController.text = - info.cachedBalance.spendable.decimal.toStringAsFixed(coin.decimals); - // cryptoAmountController.text = firoWallet - // .availablePrivateBalance() - // .decimal - // .toStringAsFixed(coin.decimals); - } else { - cryptoAmountController.text = info - .cachedBalanceSecondary.spendable.decimal - .toStringAsFixed(coin.decimals); - // cryptoAmountController.text = firoWallet - // .availablePublicBalance() - // .decimal - // .toStringAsFixed(coin.decimals); - } + if ((coin == Coin.firo || coin == Coin.firoTestNet) && + ref.read(publicPrivateBalanceStateProvider.state).state == "Private") { + cryptoAmountController.text = info + .cachedBalanceSecondary.spendable.decimal + .toStringAsFixed(coin.decimals); } else { cryptoAmountController.text = info.cachedBalance.spendable.decimal.toStringAsFixed(coin.decimals); - // cryptoAmountController.text = ref - // .read(pWallets) - // .getWallet(walletId) - // .balance - // .spendable - // .decimal - // .toStringAsFixed(coin.decimals); } } @@ -893,9 +873,8 @@ class _DesktopSendState extends ConsumerState { width: 10, ), Text( - ref.watch(pAmountFormatter(coin)).format(ref - .watch(pWalletBalanceSecondary(walletId)) - .spendable), + ref.watch(pAmountFormatter(coin)).format( + ref.watch(pWalletBalance(walletId)).spendable), style: STextStyles.itemSubtitle(context), ), ],