Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 8aafd0e

Browse files
committed
Update owner check
1 parent 97f3216 commit 8aafd0e

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

program/src/processor/get_account_data_size.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use pinocchio::{
2-
account_info::AccountInfo, program::set_return_data, program_error::ProgramError,
3-
pubkey::Pubkey, ProgramResult,
2+
account_info::AccountInfo, program::set_return_data, program_error::ProgramError, ProgramResult,
43
};
54
use token_interface::{
65
error::TokenError,
@@ -10,16 +9,13 @@ use token_interface::{
109
use super::check_account_owner;
1110

1211
#[inline(always)]
13-
pub fn process_get_account_data_size(
14-
program_id: &Pubkey,
15-
accounts: &[AccountInfo],
16-
) -> ProgramResult {
12+
pub fn process_get_account_data_size(accounts: &[AccountInfo]) -> ProgramResult {
1713
let [mint_info, _remaning @ ..] = accounts else {
1814
return Err(ProgramError::NotEnoughAccountKeys);
1915
};
2016

2117
// Make sure the mint is valid.
22-
check_account_owner(program_id, mint_info)?;
18+
check_account_owner(mint_info)?;
2319

2420
let _ = unsafe {
2521
load::<Mint>(mint_info.borrow_data_unchecked()).map_err(|_| TokenError::InvalidMint)?

0 commit comments

Comments
 (0)