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;
4
4
pub mod state;
5
5
6
6
pub mod program {
7
- pinocchio_pubkey:: declare_id!( "PToken1111111111111111111111111111111111111 " ) ;
7
+ pinocchio_pubkey:: declare_id!( "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA " ) ;
8
8
}
Original file line number Diff line number Diff line change 4
4
5
5
mod entrypoint;
6
6
mod processor;
7
-
8
- pinocchio_pubkey:: declare_id!( "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" ) ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ use pinocchio::{
10
10
} ;
11
11
use token_interface:: {
12
12
error:: TokenError ,
13
+ program:: ID as TOKEN_PROGRAM_ID ,
13
14
state:: {
14
15
load,
15
16
multisig:: { Multisig , MAX_SIGNERS } ,
@@ -84,7 +85,7 @@ const MAX_FORMATTED_DIGITS: usize = u8::MAX as usize + 2;
84
85
/// Checks that the account is owned by the expected program.
85
86
#[ inline( always) ]
86
87
fn check_account_owner ( account_info : & AccountInfo ) -> ProgramResult {
87
- if & crate :: ID != account_info. owner ( ) {
88
+ if & TOKEN_PROGRAM_ID != account_info. owner ( ) {
88
89
Err ( ProgramError :: IncorrectProgramId )
89
90
} else {
90
91
Ok ( ( ) )
@@ -102,7 +103,9 @@ fn validate_owner(
102
103
return Err ( TokenError :: OwnerMismatch . into ( ) ) ;
103
104
}
104
105
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
+ {
106
109
let multisig = unsafe { load :: < Multisig > ( owner_account_info. borrow_data_unchecked ( ) ) ? } ;
107
110
108
111
let mut num_signers = 0 ;
You can’t perform that action at this time.
0 commit comments