mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-28 06:28:41 +01:00
Upstream reformatted its whole tree in 16ddc0837. Matching it removes
formatting from the conflict surface of this and every later sync.
90 lines
2.3 KiB
Dart
90 lines
2.3 KiB
Dart
import 'package:cw_core/crypto_currency.dart';
|
|
|
|
class TransactionWrongBalanceException implements Exception {
|
|
TransactionWrongBalanceException(this.currency, {this.amount});
|
|
|
|
final CryptoCurrency currency;
|
|
final int? amount;
|
|
}
|
|
|
|
class TransactionNoInputsException implements Exception {}
|
|
|
|
class TransactionNoFeeException implements Exception {}
|
|
|
|
class TransactionNoDustException implements Exception {}
|
|
|
|
class TransactionNoDustOnChangeException implements Exception {
|
|
TransactionNoDustOnChangeException(this.max, this.min);
|
|
|
|
final String max;
|
|
final String min;
|
|
}
|
|
|
|
class TransactionCommitFailed implements Exception {
|
|
final String? errorMessage;
|
|
|
|
TransactionCommitFailed({this.errorMessage});
|
|
|
|
@override
|
|
String toString() => errorMessage ?? "unknown error";
|
|
}
|
|
|
|
class TransactionCommitFailedDustChange implements Exception {}
|
|
|
|
class TransactionCommitFailedDustOutput implements Exception {}
|
|
|
|
class TransactionCommitFailedDustOutputSendAll implements Exception {}
|
|
|
|
class TransactionCommitFailedVoutNegative implements Exception {}
|
|
|
|
class TransactionCommitFailedBIP68Final implements Exception {}
|
|
|
|
class TransactionCommitFailedLessThanMin implements Exception {}
|
|
|
|
class TransactionInputNotSupported implements Exception {}
|
|
|
|
class SignNativeTokenTransactionRentException implements Exception {}
|
|
|
|
class CreateAssociatedTokenAccountException implements Exception {
|
|
final String errorMessage;
|
|
|
|
CreateAssociatedTokenAccountException(this.errorMessage);
|
|
}
|
|
|
|
class SignSPLTokenTransactionRentException implements Exception {}
|
|
|
|
class NoAssociatedTokenAccountException implements Exception {}
|
|
|
|
class NotAnNFTException implements Exception {}
|
|
|
|
class AmbiguousTokenSymbolException implements Exception {
|
|
AmbiguousTokenSymbolException(this.symbol);
|
|
|
|
final String symbol;
|
|
}
|
|
|
|
class RestoreFromSeedException implements Exception {
|
|
final String message;
|
|
|
|
RestoreFromSeedException(this.message);
|
|
}
|
|
|
|
class WalletDeprecationException implements Exception {
|
|
final String seed;
|
|
final CryptoCurrency curr;
|
|
|
|
@override
|
|
String toString() => "Wallet type no longer supported";
|
|
|
|
WalletDeprecationException({required this.seed, required this.curr});
|
|
}
|
|
|
|
class WalletSwitchException implements Exception {
|
|
WalletSwitchException(this.message);
|
|
|
|
final String message;
|
|
|
|
@override
|
|
String toString() => message;
|
|
}
|