I want to use getOrCreateAssociatedTokenAccount function in @solana/spl-token library. I want to change second field for findATA function to wallet without secretKey.
const adminWallet = Keypair.fromSecretKey(secretKey);
const adminTokenAccount = await findATA(
connection,
adminWallet,
new anchor.web3.PublicKey(mintAccount.toString()),
adminWallet.publicKey, // adminPubKey => wallet.publicKey
);
const findATA = async (connection, payer, tokenMintAddress, walletAddress) => {
return await getOrCreateAssociatedTokenAccount(
connection,
payer,
tokenMintAddress,
walletAddress,
);
};