This commit is contained in:
fossephate 2024-09-23 17:00:22 -07:00
commit af2f0e2abe
8 changed files with 39 additions and 0 deletions

View file

@ -3,6 +3,11 @@ import 'package:cw_core/exceptions.dart';
class BitcoinTransactionWrongBalanceException extends TransactionWrongBalanceException {
BitcoinTransactionWrongBalanceException({super.amount}) : super(CryptoCurrency.btc);
@override
String toString() {
return "BitcoinTransactionWrongBalanceException: $amount, $currency";
}
}
class BitcoinTransactionNoInputsException extends TransactionNoInputsException {}
@ -13,10 +18,20 @@ class BitcoinTransactionNoDustException extends TransactionNoDustException {}
class BitcoinTransactionNoDustOnChangeException extends TransactionNoDustOnChangeException {
BitcoinTransactionNoDustOnChangeException(super.max, super.min);
@override
String toString() {
return "BitcoinTransactionNoDustOnChangeException: max: $max, min: $min";
}
}
class BitcoinTransactionCommitFailed extends TransactionCommitFailed {
BitcoinTransactionCommitFailed({super.errorMessage});
@override
String toString() {
return errorMessage??"unknown error";
}
}
class BitcoinTransactionCommitFailedDustChange extends TransactionCommitFailedDustChange {}

View file

@ -24,6 +24,11 @@ class TransactionCommitFailed implements Exception {
final String? errorMessage;
TransactionCommitFailed({this.errorMessage});
@override
String toString() {
return errorMessage??"unknown error";
}
}
class TransactionCommitFailedDustChange implements Exception {}

View file

@ -2,4 +2,9 @@ class SetupWalletException implements Exception {
SetupWalletException({required this.message});
final String message;
@override
String toString() {
return message;
}
}

View file

@ -2,4 +2,7 @@ class SetupWalletException implements Exception {
SetupWalletException({required this.message});
final String message;
@override
String toString() => message;
}

View file

@ -2,4 +2,7 @@ class WalletRestoreFromKeysException implements Exception {
WalletRestoreFromKeysException({required this.message});
final String message;
@override
String toString() => message;
}

View file

@ -2,4 +2,7 @@ class WalletRestoreFromSeedException implements Exception {
WalletRestoreFromSeedException({required this.message});
final String message;
@override
String toString() => message;
}

View file

@ -2,4 +2,7 @@ class SetupWalletException implements Exception {
SetupWalletException({required this.message});
final String message;
@override
String toString() => message;
}

View file

@ -2,4 +2,6 @@ class WalletRestoreFromKeysException implements Exception {
WalletRestoreFromKeysException({required this.message});
final String message;
String toString() => message;
}