|
@@ -1,6 +1,5 @@
|
|
|
use pinocchio::{
|
|
|
- account_info::AccountInfo, program::set_return_data, program_error::ProgramError,
|
|
|
- pubkey::Pubkey, ProgramResult,
|
|
|
+ account_info::AccountInfo, program::set_return_data, program_error::ProgramError, ProgramResult,
|
|
|
};
|
|
|
use token_interface::{
|
|
|
error::TokenError,
|
|
@@ -10,16 +9,13 @@ use token_interface::{
|
|
|
use super::check_account_owner;
|
|
|
|
|
|
#[inline(always)]
|
|
|
-pub fn process_get_account_data_size(
|
|
|
- program_id: &Pubkey,
|
|
|
- accounts: &[AccountInfo],
|
|
|
-) -> ProgramResult {
|
|
|
+pub fn process_get_account_data_size(accounts: &[AccountInfo]) -> ProgramResult {
|
|
|
let [mint_info, _remaning @ ..] = accounts else {
|
|
|
return Err(ProgramError::NotEnoughAccountKeys);
|
|
|
};
|
|
|
|
|
|
// Make sure the mint is valid.
|
|
|
- check_account_owner(program_id, mint_info)?;
|
|
|
+ check_account_owner(mint_info)?;
|
|
|
|
|
|
let _ = unsafe {
|
|
|
load::<Mint>(mint_info.borrow_data_unchecked()).map_err(|_| TokenError::InvalidMint)?
|