diff --git a/programs/openbook-v2/src/accounts_ix/close_open_orders_account.rs b/programs/openbook-v2/src/accounts_ix/close_open_orders_account.rs index bf5646bb5..8f8df6db8 100644 --- a/programs/openbook-v2/src/accounts_ix/close_open_orders_account.rs +++ b/programs/openbook-v2/src/accounts_ix/close_open_orders_account.rs @@ -3,8 +3,6 @@ use anchor_lang::prelude::*; #[derive(Accounts)] pub struct CloseOpenOrdersAccount<'info> { - #[account(mut)] - pub payer: Signer<'info>, pub owner: Signer<'info>, #[account( mut, diff --git a/programs/openbook-v2/src/accounts_ix/place_order.rs b/programs/openbook-v2/src/accounts_ix/place_order.rs index 35f3e254a..8647c6589 100644 --- a/programs/openbook-v2/src/accounts_ix/place_order.rs +++ b/programs/openbook-v2/src/accounts_ix/place_order.rs @@ -40,6 +40,7 @@ pub struct PlaceOrder<'info> { pub event_heap: AccountLoader<'info, EventHeap>, #[account( mut, + // The side of the vault is checked inside the ix constraint = market.load()?.is_market_vault(market_vault.key()) )] pub market_vault: Account<'info, TokenAccount>, diff --git a/programs/openbook-v2/tests/cases/test_indexer.rs b/programs/openbook-v2/tests/cases/test_indexer.rs index e2312e94f..7a046eaa8 100644 --- a/programs/openbook-v2/tests/cases/test_indexer.rs +++ b/programs/openbook-v2/tests/cases/test_indexer.rs @@ -69,7 +69,6 @@ async fn test_indexer() -> Result<(), TransportError> { account_num: 2, market, owner, - payer, sol_destination: owner.pubkey(), }, ) diff --git a/programs/openbook-v2/tests/program_test/client.rs b/programs/openbook-v2/tests/program_test/client.rs index 4cce1ba08..7c11dcaa9 100644 --- a/programs/openbook-v2/tests/program_test/client.rs +++ b/programs/openbook-v2/tests/program_test/client.rs @@ -229,7 +229,6 @@ pub struct CloseOpenOrdersAccountInstruction { pub account_num: u32, pub market: Pubkey, pub owner: TestKeypair, - pub payer: TestKeypair, pub sol_destination: Pubkey, } #[async_trait::async_trait(?Send)] @@ -261,7 +260,6 @@ impl ClientInstruction for CloseOpenOrdersAccountInstruction { let accounts = openbook_v2::accounts::CloseOpenOrdersAccount { owner: self.owner.pubkey(), - payer: self.payer.pubkey(), open_orders_indexer, open_orders_account, sol_destination: self.sol_destination, diff --git a/ts/client/src/client.ts b/ts/client/src/client.ts index a61293996..f45ce332c 100644 --- a/ts/client/src/client.ts +++ b/ts/client/src/client.ts @@ -910,10 +910,8 @@ export class OpenBookV2Client { } public async closeOpenOrdersAccountIx( - payer: Keypair, owner: Keypair = payer, openOrdersPublicKey: PublicKey, - market: MarketAccount, solDestination: PublicKey = this.walletPk, openOrdersIndexer?: PublicKey, ): Promise<[TransactionInstruction, Signer[]]> { @@ -924,7 +922,6 @@ export class OpenBookV2Client { const ix = await this.program.methods .closeOpenOrdersAccount() .accounts({ - payer: payer.publicKey, owner: owner.publicKey, openOrdersIndexer, openOrdersAccount: openOrdersPublicKey,