mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
* fix android CI * feat: add anypay core models, parser and routing engine * feat: add anypay resolver, anypay service and wallet switch service * refactor: route the send page payment flow through anypay service * fix: show message when there's no swap providers for a pair and reset the trade guard on dismissal * refactor: merge the swap from network and send to network decision pages together and clean up anypay widgets * feat: reapply deep links to a currently open send flow and register the solana scheme * feat: add support for zcash address detection to anypay and other minor fixes * refactor: remove trailing icon * feat: hide swap flow for sp and mweb addresses * feat: enhance zcash address detection and deeplink handling * fix: pin bitcoin_base * refactor: Move the anypay decision navigation out of the send page and address minor review comments * refactor: Move the anypay decision navigation out of the send page and address minor review comments * feat: handle exception in switch service and mvoe balance compute to call site * refactor: combine anypay entry points to one and extract selected mode widget --------- Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
82 lines
2.1 KiB
Dart
82 lines
2.1 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 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;
|
|
}
|