mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-18 05:51:34 +02:00
Fix displayed balance not updating when changing send currency
make mweb conditions only specific for Litecoin wallet
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user