mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
* feat: improvements covering solana nfts(send, ownership badge, persistent imports etc), closing emptied token accounts and other fixes from patch * feat: more improvements for nfts including security hardening * fix: display error in full
45 lines
1.4 KiB
Dart
45 lines
1.4 KiB
Dart
import 'package:cw_core/crypto_currency.dart';
|
|
import 'package:cw_core/exceptions.dart';
|
|
|
|
class SolanaTransactionCreationException implements Exception {
|
|
final String exceptionMessage;
|
|
|
|
SolanaTransactionCreationException(CryptoCurrency currency)
|
|
: exceptionMessage = 'Error creating ${currency.title} transaction.';
|
|
|
|
@override
|
|
String toString() => exceptionMessage;
|
|
}
|
|
|
|
class SolanaTransactionWrongBalanceException implements Exception {
|
|
final String exceptionMessage;
|
|
|
|
SolanaTransactionWrongBalanceException(CryptoCurrency currency)
|
|
: exceptionMessage = 'Wrong balance. Not enough ${currency.title} on your balance.';
|
|
|
|
@override
|
|
String toString() => exceptionMessage;
|
|
}
|
|
|
|
class SolanaSignNativeTokenTransactionRentException
|
|
extends SignNativeTokenTransactionRentException {}
|
|
|
|
class SolanaCreateAssociatedTokenAccountException extends CreateAssociatedTokenAccountException {
|
|
SolanaCreateAssociatedTokenAccountException(super.errorMessage);
|
|
}
|
|
|
|
class SolanaSignSPLTokenTransactionRentException extends SignSPLTokenTransactionRentException {}
|
|
|
|
class SolanaNotAnNFTException extends NotAnNFTException {}
|
|
|
|
class SolanaNoAssociatedTokenAccountException extends NoAssociatedTokenAccountException {
|
|
SolanaNoAssociatedTokenAccountException(this.account, this.mint);
|
|
|
|
final String account;
|
|
final String mint;
|
|
}
|
|
|
|
class SolanaAmbiguousTokenSymbolException extends AmbiguousTokenSymbolException {
|
|
SolanaAmbiguousTokenSymbolException(super.symbol);
|
|
}
|