mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 03:59:23 +00:00
a9b8c03e55
* fix: Generic bug fixes across solana * fix: Remove back and forth parsing * fix: Add check to cut flow when estimated fee is higher than wallet balance * Update error message for fees exception * Remove logs --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
22 lines
650 B
Dart
22 lines
650 B
Dart
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;
|
|
}
|