cake_wallet/cw_ethereum/lib/ethereum_exceptions.dart

12 lines
362 B
Dart
Raw Normal View History

2023-07-22 02:59:38 +00:00
import 'package:cw_core/crypto_currency.dart';
2023-03-16 17:24:21 +00:00
class EthereumTransactionCreationException implements Exception {
2023-03-31 18:41:56 +00:00
final String exceptionMessage;
2023-07-22 02:59:38 +00:00
EthereumTransactionCreationException(CryptoCurrency currency) :
this.exceptionMessage = 'Wrong balance. Not enough ${currency.title} on your balance.';
2023-03-16 17:24:21 +00:00
@override
2023-03-31 18:41:56 +00:00
String toString() => exceptionMessage;
}