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

Commit 0dbd53d

Browse files
committed
another place to use the spl-program-ids crate
1 parent 3c8c186 commit 0dbd53d

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

managed-token/program/src/accounts.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use {
55
program_error::ProgramError,
66
system_program,
77
},
8-
spl_associated_token_address::ASSOCIATED_TOKEN_PROGRAM_ID,
98
};
109

1110
pub struct InitializeMint<'a, 'info> {
@@ -117,7 +116,7 @@ impl<'a, 'info> InitializeAccount<'a, 'info> {
117116
"Invalid key supplied for System Program",
118117
)?;
119118
assert_with_msg(
120-
ctx.associated_token_program.key == &ASSOCIATED_TOKEN_PROGRAM_ID,
119+
ctx.associated_token_program.key == &spl_program_ids::spl_managed_token::ID,
121120
ProgramError::InvalidInstructionData,
122121
"Invalid key supplied for Associataed Token Program",
123122
)?;

managed-token/program/src/instruction.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use {
88
pubkey::Pubkey,
99
system_program,
1010
},
11-
spl_associated_token_address::{get_associated_token_address, ASSOCIATED_TOKEN_PROGRAM_ID},
11+
spl_associated_token_address::get_associated_token_address,
1212
};
1313

1414
#[derive(Debug, Clone, ShankInstruction, BorshSerialize, BorshDeserialize)]
@@ -127,7 +127,7 @@ pub fn create_initialize_account_instruction(
127127
AccountMeta::new_readonly(freeze_authority, false),
128128
AccountMeta::new_readonly(*mint, false),
129129
AccountMeta::new_readonly(system_program::id(), false),
130-
AccountMeta::new_readonly(ASSOCIATED_TOKEN_PROGRAM_ID, false),
130+
AccountMeta::new_readonly(spl_program_ids::spl_managed_token::ID, false),
131131
AccountMeta::new_readonly(spl_token::id(), false),
132132
],
133133
data: borsh::to_vec(&ManagedTokenInstruction::InitializeAccount)?,

0 commit comments

Comments
 (0)