@@ -42,10 +42,10 @@ fn validate_zap_parameters(
4242fn search_and_validate_zap_out_instruction (
4343 max_claim_amount : u64 ,
4444 sysvar_instructions : & Instructions < & [ u8 ] > ,
45- claimer_token_account_key : & [ u8 ; 32 ] ,
45+ claimer_token_account_key : & Pubkey ,
4646 claimer_token_account_data : & [ u8 ] ,
47- treasury_address : [ u8 ; 32 ] ,
48- treasury_paired_destination_token_address : [ u8 ; 32 ] ,
47+ treasury_address : & Pubkey ,
48+ treasury_paired_destination_token_address : & Pubkey ,
4949) -> Result < ( ) , ProtozolZapError > {
5050 // Zap out instruction must be next to current instruction
5151 let ix = sysvar_instructions
@@ -99,7 +99,7 @@ fn search_and_validate_zap_out_instruction(
9999 let treasury_sol_address = get_associated_token_address ( & treasury_address, & SOL_ADDRESS ) ;
100100
101101 // Zap to paired mint in the pool, or SOL, or USDC treasury
102- if destination_token_address != treasury_paired_destination_token_address
102+ if destination_token_address != * treasury_paired_destination_token_address
103103 && destination_token_address != treasury_usdc_address
104104 && destination_token_address != treasury_sol_address
105105 {
@@ -111,12 +111,12 @@ fn search_and_validate_zap_out_instruction(
111111
112112pub fn validate_zap_out_to_treasury (
113113 claimed_amount : u64 ,
114- calling_program_id : [ u8 ; 32 ] ,
115- claimer_token_account_key : & [ u8 ; 32 ] ,
114+ calling_program_id : & Pubkey ,
115+ claimer_token_account_key : & Pubkey ,
116116 claimer_token_account_data : & [ u8 ] ,
117117 sysvar_instructions_data : & [ u8 ] ,
118- treasury_address : [ u8 ; 32 ] ,
119- treasury_paired_destination_token_address : [ u8 ; 32 ] ,
118+ treasury_address : & Pubkey ,
119+ treasury_paired_destination_token_address : & Pubkey ,
120120) -> Result < ( ) , ProtozolZapError > {
121121 let sysvar_instructions = unsafe { Instructions :: new_unchecked ( sysvar_instructions_data) } ;
122122 let current_index = sysvar_instructions. load_current_index ( ) ;
@@ -126,7 +126,7 @@ pub fn validate_zap_out_to_treasury(
126126 . map_err ( |_| ProtozolZapError :: InvalidZapAccounts ) ?;
127127
128128 // Ensure the instruction is direct instruction call
129- if * current_instruction. get_program_id ( ) != calling_program_id {
129+ if * current_instruction. get_program_id ( ) != * calling_program_id {
130130 return Err ( ProtozolZapError :: CpiDisabled ) ;
131131 }
132132
0 commit comments