You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: AnchorError caused by account: token_account. Error Code: AccountNotAssociatedTokenAccount. Error Number: 3014. Error Message: The given account is not the associated token account.
Hello, I'm glad to hear that Anchor supports Token-2022 Program now!
Anchor v0.27.0 supports Token-2022 Program and many cases work well.
But I found two error cases for
associated_token
constraint.Case 1
Use
associated_token
withinit_if_need
Error Messages:
Error: AnchorError caused by account: token_account. Error Code: ConstraintAssociated. Error Number: 2009. Error Message: An associated constraint was violated.
anchor/lang/syn/src/codegen/accounts/constraints.rs
Line 901 in 3b45144
Case 2
Use
associated_token
constraintError: AnchorError caused by account: token_account. Error Code: AccountNotAssociatedTokenAccount. Error Number: 3014. Error Message: The given account is not the associated token account.
anchor/lang/syn/src/codegen/accounts/constraints.rs
Line 625 in 3b45144
Both cases did not use
token_program
to make ATA.The text was updated successfully, but these errors were encountered: