cake_wallet/cw_evm/lib/evm_chain_exceptions.dart

23 lines
650 B
Dart
Raw Normal View History

import 'package:cw_core/crypto_currency.dart';
class EVMChainTransactionCreationException implements Exception {
final String exceptionMessage;
EVMChainTransactionCreationException(CryptoCurrency currency)
: exceptionMessage = 'Wrong balance. Not enough ${currency.title} on your balance.';
@override
String toString() => exceptionMessage;
}
class EVMChainTransactionFeesException implements Exception {
final String exceptionMessage;
EVMChainTransactionFeesException()
: exceptionMessage = 'Current balance is less than the estimated fees for this transaction.';
@override
String toString() => exceptionMessage;
}