mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
minor: improve eth/poly fees error message
This commit is contained in:
parent
fd4254d65b
commit
130f877234
2 changed files with 3 additions and 3 deletions
|
@ -16,8 +16,8 @@ class EVMChainTransactionCreationException implements Exception {
|
||||||
class EVMChainTransactionFeesException implements Exception {
|
class EVMChainTransactionFeesException implements Exception {
|
||||||
final String exceptionMessage;
|
final String exceptionMessage;
|
||||||
|
|
||||||
EVMChainTransactionFeesException()
|
EVMChainTransactionFeesException(String currency)
|
||||||
: exceptionMessage = 'Current balance is less than the estimated fees for this transaction.';
|
: exceptionMessage = 'Transaction failed due to insufficient $currency balance to cover the fees.';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => exceptionMessage;
|
String toString() => exceptionMessage;
|
||||||
|
|
|
@ -417,7 +417,7 @@ abstract class EVMChainWalletBase
|
||||||
|
|
||||||
// check the fees on the base currency (Eth/Polygon)
|
// check the fees on the base currency (Eth/Polygon)
|
||||||
if (estimatedFeesForTransaction > balance[currency]!.balance) {
|
if (estimatedFeesForTransaction > balance[currency]!.balance) {
|
||||||
throw EVMChainTransactionFeesException();
|
throw EVMChainTransactionFeesException(currency.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currencyBalance.balance < totalAmount) {
|
if (currencyBalance.balance < totalAmount) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue