Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit eff3677

Browse files
authored
Correct findAssociatedTokenAddress JS sample
Fixes #869
1 parent 222ec66 commit eff3677

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/src/associated-token-account.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ async function findAssociatedTokenAddress(
5353
walletAddress: Pubkey,
5454
tokenMintAddress: Pubkey
5555
): Promise<PublicKey> {
56-
return PublicKey.findProgramAddress(
56+
return (await PublicKey.findProgramAddress(
5757
[
5858
walletAddress.toBuffer(),
5959
SPL_TOKEN_PROGRAM_ID.toBuffer(),
6060
tokenMintAddress.toBuffer(),
6161
],
6262
SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID
63-
)[0];
63+
))[0];
6464
}
6565
```
6666

0 commit comments

Comments
 (0)