minor: improve eth/poly fees error message

This commit is contained in:
OmarHatem 2025-03-02 17:29:53 +02:00
parent fd4254d65b
commit 130f877234
2 changed files with 3 additions and 3 deletions

View file

@ -16,8 +16,8 @@ class EVMChainTransactionCreationException implements Exception {
class EVMChainTransactionFeesException implements Exception {
final String exceptionMessage;
EVMChainTransactionFeesException()
: exceptionMessage = 'Current balance is less than the estimated fees for this transaction.';
EVMChainTransactionFeesException(String currency)
: exceptionMessage = 'Transaction failed due to insufficient $currency balance to cover the fees.';
@override
String toString() => exceptionMessage;

View file

@ -417,7 +417,7 @@ abstract class EVMChainWalletBase
// check the fees on the base currency (Eth/Polygon)
if (estimatedFeesForTransaction > balance[currency]!.balance) {
throw EVMChainTransactionFeesException();
throw EVMChainTransactionFeesException(currency.title);
}
if (currencyBalance.balance < totalAmount) {