CAKE-345 | fixed conditions in electrum_wallet.dart and monero_wallet.dart

This commit is contained in:
OleksandrSobol 2021-08-13 15:06:40 +03:00
parent 30a32ab071
commit 3967cc8d40
2 changed files with 4 additions and 4 deletions

View file

@ -186,8 +186,8 @@ abstract class ElectrumWalletBase extends WalletBase<ElectrumBalance,
var fee = 0; var fee = 0;
if (hasMultiDestination) { if (hasMultiDestination) {
if (outputs.any((item) => item.sendAll) || if (outputs.any((item) => item.sendAll
outputs.any((item) => item.formattedCryptoAmount <= 0)) { || item.formattedCryptoAmount <= 0)) {
throw BitcoinTransactionWrongBalanceException(currency); throw BitcoinTransactionWrongBalanceException(currency);
} }

View file

@ -163,8 +163,8 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance,
} }
if (hasMultiDestination) { if (hasMultiDestination) {
if (outputs.any((item) => item.sendAll) || if (outputs.any((item) => item.sendAll
outputs.any((item) => item.formattedCryptoAmount <= 0)) { || item.formattedCryptoAmount <= 0)) {
throw MoneroTransactionCreationException('Wrong balance. Not enough XMR on your balance.'); throw MoneroTransactionCreationException('Wrong balance. Not enough XMR on your balance.');
} }