This repository was archived by the owner on Feb 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ pub mod native_mint;
44pub mod state;
55
66pub mod program {
7- pinocchio_pubkey:: declare_id!( "PToken1111111111111111111111111111111111111 " ) ;
7+ pinocchio_pubkey:: declare_id!( "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA " ) ;
88}
Original file line number Diff line number Diff line change 44
55mod entrypoint;
66mod processor;
7-
8- pinocchio_pubkey:: declare_id!( "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" ) ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ use pinocchio::{
1010} ;
1111use token_interface:: {
1212 error:: TokenError ,
13+ program:: ID as TOKEN_PROGRAM_ID ,
1314 state:: {
1415 load,
1516 multisig:: { Multisig , MAX_SIGNERS } ,
@@ -84,7 +85,7 @@ const MAX_FORMATTED_DIGITS: usize = u8::MAX as usize + 2;
8485/// Checks that the account is owned by the expected program.
8586#[ inline( always) ]
8687fn check_account_owner ( account_info : & AccountInfo ) -> ProgramResult {
87- if & crate :: ID != account_info. owner ( ) {
88+ if & TOKEN_PROGRAM_ID != account_info. owner ( ) {
8889 Err ( ProgramError :: IncorrectProgramId )
8990 } else {
9091 Ok ( ( ) )
@@ -102,7 +103,9 @@ fn validate_owner(
102103 return Err ( TokenError :: OwnerMismatch . into ( ) ) ;
103104 }
104105
105- if owner_account_info. data_len ( ) == Multisig :: LEN && & crate :: ID == owner_account_info. owner ( ) {
106+ if owner_account_info. data_len ( ) == Multisig :: LEN
107+ && owner_account_info. owner ( ) == & TOKEN_PROGRAM_ID
108+ {
106109 let multisig = unsafe { load :: < Multisig > ( owner_account_info. borrow_data_unchecked ( ) ) ? } ;
107110
108111 let mut num_signers = 0 ;
You can’t perform that action at this time.
0 commit comments