mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
Fix displayed balance not updating when changing send currency
make mweb conditions only specific for Litecoin wallet
This commit is contained in:
parent
65e771cbbe
commit
da2b3ce632
1 changed files with 2 additions and 2 deletions
|
@ -217,9 +217,9 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor
|
|||
|
||||
@computed
|
||||
String get balance {
|
||||
if (coinTypeToSpendFrom == UnspentCoinType.mweb) {
|
||||
if (walletType == WalletType.litecoin && coinTypeToSpendFrom == UnspentCoinType.mweb) {
|
||||
return balanceViewModel.balances.values.first.secondAvailableBalance;
|
||||
} else if (coinTypeToSpendFrom == UnspentCoinType.nonMweb) {
|
||||
} else if (walletType == WalletType.litecoin && coinTypeToSpendFrom == UnspentCoinType.nonMweb) {
|
||||
return balanceViewModel.balances.values.first.availableBalance;
|
||||
}
|
||||
return wallet.balance[selectedCryptoCurrency]!.formattedFullAvailableBalance;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue