Skip to content

fix(svm): make token_mint_address not optional in the function definition docs#396

Merged
MicaiahReid merged 2 commits intosolana-foundation:mainfrom
aspnxdd:fix/get-associated-token-account-function-def
Mar 19, 2026
Merged

fix(svm): make token_mint_address not optional in the function definition docs#396
MicaiahReid merged 2 commits intosolana-foundation:mainfrom
aspnxdd:fix/get-associated-token-account-function-def

Conversation

@aspnxdd
Copy link
Contributor

@aspnxdd aspnxdd commented Mar 11, 2026

In the FunctionImplementation for GetAssociatedTokenAccount, the 2nd arg (args.get(1)) is required, but in the function definition it says it's optional. It is indeed not optional.

       let token_mint_address = SvmValue::to_pubkey(args.get(1).unwrap()).map_err(|e| {
            to_diag(
                fn_spec,
                format!("invalid token mint address for getting associated token account: {e}"),
            )
        })?;

This PR changes the optional value in the function definition.

@aspnxdd aspnxdd changed the title Make token_mint_address not optional in the function definition docs fix(svm): make token_mint_address not optional in the function definition docs Mar 12, 2026
@MicaiahReid MicaiahReid merged commit 5661f36 into solana-foundation:main Mar 19, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants