diff --git a/programs/cardinal-creator-standard/src/instructions/mint_manager/close_mint_manager.rs b/programs/cardinal-creator-standard/src/instructions/mint_manager/close_mint_manager.rs index 7ce3d6bc..b68dcc46 100644 --- a/programs/cardinal-creator-standard/src/instructions/mint_manager/close_mint_manager.rs +++ b/programs/cardinal-creator-standard/src/instructions/mint_manager/close_mint_manager.rs @@ -1,3 +1,4 @@ +use crate::errors::ErrorCode; use crate::state::assert_mint_manager_seeds; use crate::state::CreatorStandardAccount; use crate::state::MintManager; @@ -69,6 +70,9 @@ impl<'a, 'info> CloseMintManagerCtx<'a, 'info> { }; // deserializations let mint_manager: MintManager = MintManager::from_account_info(ctx.mint_manager)?; + if mint_manager.in_use_by.is_some() { + return Err(ProgramError::from(ErrorCode::TokenCurentlyInUse)); + } // mint_manager assert_mut(ctx.mint_manager, "mint_manager")?;