From ab34a86f3221374b8a950905889449f7dc77c6c4 Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 14 Aug 2023 12:05:47 -0600 Subject: [PATCH] added check_account_infos util --- token/transfer-hook-example/src/processor.rs | 21 -------------------- 1 file changed, 21 deletions(-) diff --git a/token/transfer-hook-example/src/processor.rs b/token/transfer-hook-example/src/processor.rs index e38cf84f2f4..fccd0ba0bae 100644 --- a/token/transfer-hook-example/src/processor.rs +++ b/token/transfer-hook-example/src/processor.rs @@ -36,27 +36,6 @@ fn check_token_account_is_transferring(account_info: &AccountInfo) -> Result<(), } } -fn check_extra_meta( - account_info: &AccountInfo, - extra_meta: &AccountMeta, -) -> Result<(), ProgramError> { - if !(&extra_meta.pubkey == account_info.key - && extra_meta.is_signer == account_info.is_signer - && extra_meta.is_writable == account_info.is_writable) - { - return Err(TransferHookError::IncorrectAccount.into()); - } - Ok(()) -} - -fn next_extra_account_meta<'a>( - extra_account_metas_iter: &mut impl Iterator, -) -> Result<&'a ExtraAccountMeta, ProgramError> { - extra_account_metas_iter - .next() - .ok_or(ProgramError::NotEnoughAccountKeys) -} - /// Processes an [Execute](enum.TransferHookInstruction.html) instruction. pub fn process_execute( program_id: &Pubkey,