diff --git a/token/program-2022/src/lib.rs b/token/program-2022/src/lib.rs index dc2985b7b0e..573fd0f18d7 100644 --- a/token/program-2022/src/lib.rs +++ b/token/program-2022/src/lib.rs @@ -112,10 +112,12 @@ pub fn check_spl_token_program_account(spl_token_program_id: &Pubkey) -> Program Ok(()) } -/// Checks that the supplied program ID is correct for the ZK Token proof +/// Checks that the supplied program ID is correct for the ZK ElGamal proof /// program -pub fn check_zk_token_proof_program_account(zk_token_proof_program_id: &Pubkey) -> ProgramResult { - if zk_token_proof_program_id != &solana_zk_sdk::zk_elgamal_proof_program::id() { +pub fn check_zk_elgamal_proof_program_account( + zk_elgamal_proof_program_id: &Pubkey, +) -> ProgramResult { + if zk_elgamal_proof_program_id != &solana_zk_sdk::zk_elgamal_proof_program::id() { return Err(ProgramError::IncorrectProgramId); } Ok(()) diff --git a/token/program-2022/src/proof.rs b/token/program-2022/src/proof.rs index 8d32581e878..1bebfabe827 100644 --- a/token/program-2022/src/proof.rs +++ b/token/program-2022/src/proof.rs @@ -1,7 +1,7 @@ //! Helper for processing instruction data from ZK ElGamal proof program use { - crate::check_zk_token_proof_program_account, + crate::check_zk_elgamal_proof_program_account, bytemuck::Pod, solana_program::{ account_info::{next_account_info, AccountInfo}, @@ -107,7 +107,7 @@ pub fn verify_and_extract_context<'a, T: Pod + ZkProofData, U: Pod>( if proof_instruction_offset == 0 { // interpret `account_info` as a context state account let context_state_account_info = next_account_info(account_info_iter)?; - check_zk_token_proof_program_account(context_state_account_info.owner)?; + check_zk_elgamal_proof_program_account(context_state_account_info.owner)?; let context_state_account_data = context_state_account_info.data.borrow(); let context_state = pod_from_bytes::>(&context_state_account_data)?;