mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
minor: improve eth/poly fees error message
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user