Skip to content

Commit

Permalink
solana: pass token_program to ATA (support token22) (#399)
Browse files Browse the repository at this point in the history
The associated token program instructions default to the legacy SPL
token program. We pass the token_program as an argument to support
token2022 tokens too.
  • Loading branch information
kcsongor authored Apr 25, 2024
1 parent 3f45ce1 commit 6c8ace6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ pub struct Initialize<'info> {
payer = payer,
associated_token::mint = mint,
associated_token::authority = token_authority,
associated_token::token_program = token_program,
)]
/// The custody account that holds tokens in locking mode.
/// NOTE: the account is unconditionally initialized, but not used in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ pub struct ReleaseInbound<'info> {
#[account(
mut,
associated_token::authority = inbox_item.recipient_address,
associated_token::mint = mint
associated_token::mint = mint,
associated_token::token_program = token_program,
)]
pub recipient: InterfaceAccount<'info, token_interface::TokenAccount>,

Expand Down

0 comments on commit 6c8ace6

Please sign in to comment.