Disable sendAll on native EVM Currencies (#1753)

* fix: Issue with nownodes on older wallets * fix: Disable sendAll on native evm currencies

David Adegoke committed Oct 17, 2024 at 02:17 UTC cd5a1277a7759e11d3f5d0714abb3b8df8e463db
1 file changed +11 -1
lib/view_model/send/send_view_model.dart
+11 -1
@@ -123,7 +123,17 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor
123 @computed
124 bool get isBatchSending => outputs.length > 1;
125
126 - bool get shouldDisplaySendALL => walletType != WalletType.solana;
126 + bool get shouldDisplaySendALL {
127 + if (walletType == WalletType.solana) return false;
128 +
129 + if (walletType == WalletType.ethereum && selectedCryptoCurrency == CryptoCurrency.eth)
130 + return false;
131 +
132 + if (walletType == WalletType.polygon && selectedCryptoCurrency == CryptoCurrency.matic)
133 + return false;
134 +
135 + return true;
136 + }
137
138 @computed
139 String get pendingTransactionFiatAmount {