mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-18 02:07:43 +00:00
more firo balance ui fixes
This commit is contained in:
parent
03526d0f5d
commit
43bca4cf34
1 changed files with 7 additions and 28 deletions
|
@ -688,34 +688,14 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
|
|||
Future<void> 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<DesktopSend> {
|
|||
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),
|
||||
),
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue