hasAssociatedTokenAccount method
Future<bool>
hasAssociatedTokenAccount({
- required Ed25519HDPublicKey owner,
- required Ed25519HDPublicKey mint,
- Commitment commitment = Commitment.finalized,
Whether this wallet has an associated token account for the SPL token
mint.
Implementation
Future<bool> hasAssociatedTokenAccount({
required Ed25519HDPublicKey owner,
required Ed25519HDPublicKey mint,
Commitment commitment = Commitment.finalized,
}) async {
final account = await getAssociatedTokenAccount(
owner: owner,
mint: mint,
commitment: commitment,
);
return account != null;
}