Open ViktorKirjanov opened 2 years ago
Ok. i found where is the problem
you should import
import { ParsedAccountData } from "@solana/web3.js";
and add as ParsedAccountData
// Get minted token amount on the ATA for our anchor wallet
const tokenAccount = await program.provider.connection.getParsedAccountInfo(
associatedTokenAccount
);
const accountData = (tokenAccount.value?.data as ParsedAccountData).parsed;
assert.equal(accountData.info.tokenAmount.amount, 10);
Hi, Thank you for your tutorials. But i have a question about Mint a token" test. it works fine but i got an error in VS Code, it says that there is something wrong with parsed field