diff --git a/Anchor.toml b/Anchor.toml index ed2f611..3fcc84e 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -35,7 +35,7 @@ program = "tests/deps/mpl_migration_validator.so" # custom migration valid mmm = "mmm3XBJg5gk8XJxEKBvdgptZz6SgK4tXvn36sodowMc" [scripts] -test = "npx ts-mocha -p ./tsconfig.json -t 1000000 tests/mmm-ocp.spec.ts" +test = "npx ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.spec.ts" [toolchain] anchor = "0.29.0" diff --git a/programs/mmm/src/instructions/ocp/ocp_deposit_sell.rs b/programs/mmm/src/instructions/ocp/ocp_deposit_sell.rs index 4ddb821..90b2b55 100644 --- a/programs/mmm/src/instructions/ocp/ocp_deposit_sell.rs +++ b/programs/mmm/src/instructions/ocp/ocp_deposit_sell.rs @@ -148,7 +148,7 @@ pub fn handler(ctx: Context, args: DepositSellArgs) -> Result<() if asset_token_account.amount == args.asset_amount { open_creator_protocol::cpi::close(CpiContext::new( - ctx.accounts.cmt_program.to_account_info(), + ctx.accounts.ocp_program.to_account_info(), open_creator_protocol::cpi::accounts::CloseCtx { policy: ctx.accounts.ocp_policy.to_account_info(), freeze_authority: ctx.accounts.ocp_freeze_authority.to_account_info(), diff --git a/programs/mmm/src/instructions/ocp/ocp_withdraw_sell.rs b/programs/mmm/src/instructions/ocp/ocp_withdraw_sell.rs index f1a4499..d8aa5cb 100644 --- a/programs/mmm/src/instructions/ocp/ocp_withdraw_sell.rs +++ b/programs/mmm/src/instructions/ocp/ocp_withdraw_sell.rs @@ -160,7 +160,7 @@ pub fn handler(ctx: Context, args: WithdrawSellArgs) -> Result< // we can close the sellside_escrow_token_account if no amount left if sellside_escrow_token_account.amount == args.asset_amount { open_creator_protocol::cpi::close(CpiContext::new_with_signer( - ctx.accounts.cmt_program.to_account_info(), + ctx.accounts.ocp_program.to_account_info(), open_creator_protocol::cpi::accounts::CloseCtx { policy: ctx.accounts.ocp_policy.to_account_info(), freeze_authority: ctx.accounts.ocp_freeze_authority.to_account_info(), diff --git a/programs/mmm/src/instructions/ocp/sol_ocp_fulfill_buy.rs b/programs/mmm/src/instructions/ocp/sol_ocp_fulfill_buy.rs index b230b77..3df7002 100644 --- a/programs/mmm/src/instructions/ocp/sol_ocp_fulfill_buy.rs +++ b/programs/mmm/src/instructions/ocp/sol_ocp_fulfill_buy.rs @@ -240,7 +240,7 @@ pub fn handler<'info>( // we can close the payer_asset_account if no amount left if payer_asset_account.amount == args.asset_amount { open_creator_protocol::cpi::close(CpiContext::new( - ctx.accounts.cmt_program.to_account_info(), + ctx.accounts.ocp_program.to_account_info(), open_creator_protocol::cpi::accounts::CloseCtx { policy: ocp_policy.to_account_info(), freeze_authority: ctx.accounts.ocp_freeze_authority.to_account_info(), diff --git a/programs/mmm/src/instructions/ocp/sol_ocp_fulfill_sell.rs b/programs/mmm/src/instructions/ocp/sol_ocp_fulfill_sell.rs index 21926aa..3f095fc 100644 --- a/programs/mmm/src/instructions/ocp/sol_ocp_fulfill_sell.rs +++ b/programs/mmm/src/instructions/ocp/sol_ocp_fulfill_sell.rs @@ -238,7 +238,7 @@ pub fn handler<'info>( // we can close the sellside_escrow_token_account if no amount left if sellside_escrow_token_account.amount == args.asset_amount { open_creator_protocol::cpi::close(CpiContext::new_with_signer( - ctx.accounts.cmt_program.to_account_info(), + ctx.accounts.ocp_program.to_account_info(), open_creator_protocol::cpi::accounts::CloseCtx { policy: ocp_policy.to_account_info(), freeze_authority: ctx.accounts.ocp_freeze_authority.to_account_info(), diff --git a/tests/mmm-ocp.spec.ts b/tests/mmm-ocp.spec.ts index 411161a..c9b2714 100644 --- a/tests/mmm-ocp.spec.ts +++ b/tests/mmm-ocp.spec.ts @@ -68,7 +68,7 @@ describe('mmm-ocp', () => { await airdrop(connection, wallet.publicKey, 50); }); - it.only('can deposit and withdraw ocp NFTs - happy path', async () => { + it('can deposit and withdraw ocp NFTs - happy path', async () => { const creator = Keypair.generate(); const nftRes = await createTestMintAndTokenOCP( connection,