2

Does anyone know why I failed to request getAccount immediately after creating an Associated Token Account? How can I verify that an Associated Account Token has been created?

1
  • 1
    would be useful to see any errors that may have been thrown.
    – m_callens
    Commented Sep 7, 2022 at 14:14

1 Answer 1

1

Might be due to misalignment of commitment between sendTransaction and getAccount you're using.

You can also use getOrCreate , might be easier for your needs:

https://solana-labs.github.io/solana-program-library/token/js/modules.html#getOrCreateAssociatedTokenAccount

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.