diff --git a/lib/client/src/client.rs b/lib/client/src/client.rs index 15a6a3d26..aabeb564e 100644 --- a/lib/client/src/client.rs +++ b/lib/client/src/client.rs @@ -146,16 +146,11 @@ impl OpenBookClient { pub async fn create_open_orders_indexer( client: &Client, - market: Pubkey, owner: &Keypair, payer: &Keypair, // pays the SOL for the new account ) -> anyhow::Result<(Pubkey, Signature)> { let open_orders_indexer = Pubkey::find_program_address( - &[ - b"OpenOrdersIndexer".as_ref(), - owner.pubkey().as_ref(), - market.as_ref(), - ], + &[b"OpenOrdersIndexer".as_ref(), owner.pubkey().as_ref()], &openbook_v2::id(), ) .0; @@ -167,7 +162,6 @@ impl OpenBookClient { owner: owner.pubkey(), open_orders_indexer, payer: payer.pubkey(), - market, system_program: System::id(), }, None, diff --git a/programs/openbook-v2/fuzz/src/lib.rs b/programs/openbook-v2/fuzz/src/lib.rs index ed3da7f54..e854d5bb6 100644 --- a/programs/openbook-v2/fuzz/src/lib.rs +++ b/programs/openbook-v2/fuzz/src/lib.rs @@ -227,7 +227,6 @@ impl FuzzContext { open_orders_indexer: indexer, owner, payer: self.payer, - market: self.market, system_program: system_program::ID, }; let data = openbook_v2::instruction::CreateOpenOrdersIndexer {}; diff --git a/programs/openbook-v2/src/accounts_ix/create_open_orders_indexer.rs b/programs/openbook-v2/src/accounts_ix/create_open_orders_indexer.rs index 2b08606f5..6c84c8904 100644 --- a/programs/openbook-v2/src/accounts_ix/create_open_orders_indexer.rs +++ b/programs/openbook-v2/src/accounts_ix/create_open_orders_indexer.rs @@ -1,4 +1,4 @@ -use crate::state::{Market, OpenOrdersIndexer}; +use crate::state::OpenOrdersIndexer; use anchor_lang::prelude::*; #[derive(Accounts)] @@ -14,6 +14,5 @@ pub struct CreateOpenOrdersIndexer<'info> { space = OpenOrdersIndexer::space(0), )] pub open_orders_indexer: Account<'info, OpenOrdersIndexer>, - pub market: AccountLoader<'info, Market>, pub system_program: Program<'info, System>, } diff --git a/programs/openbook-v2/tests/program_test/client.rs b/programs/openbook-v2/tests/program_test/client.rs index 3cf5ba23c..a9d696b5f 100644 --- a/programs/openbook-v2/tests/program_test/client.rs +++ b/programs/openbook-v2/tests/program_test/client.rs @@ -156,7 +156,6 @@ impl ClientInstruction for CreateOpenOrdersIndexerInstruction { payer: self.payer.pubkey(), owner: self.owner.pubkey(), open_orders_indexer, - market: self.market, system_program: System::id(), };