Fix displayed balance not updating when changing send currency make mweb conditions only specific for Litecoin wallet
Fix displayed balance not updating when changing send currency make mweb conditions only specific for Litecoin wallet
OmarHatem committed
Apr 2, 2025 at 18:48 UTC
da2b3ce6321224d2a1b62c4ccc878a7fe80ae704
1 file changed
+2
-2
lib/view_model/send/send_view_model.dart
+2
-2
@@ -217,9 +217,9 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor
217
218
@computed
219
String get balance {
220
- if (coinTypeToSpendFrom == UnspentCoinType.mweb) {
220
+ if (walletType == WalletType.litecoin && coinTypeToSpendFrom == UnspentCoinType.mweb) {
221
return balanceViewModel.balances.values.first.secondAvailableBalance;
222
- } else if (coinTypeToSpendFrom == UnspentCoinType.nonMweb) {
222
+ } else if (walletType == WalletType.litecoin && coinTypeToSpendFrom == UnspentCoinType.nonMweb) {
223
return balanceViewModel.balances.values.first.availableBalance;
224
}
225
return wallet.balance[selectedCryptoCurrency]!.formattedFullAvailableBalance;