Skip to content

Commit

Permalink
rm unused accs
Browse files Browse the repository at this point in the history
  • Loading branch information
skrrb committed Sep 28, 2023
1 parent a5d9fb2 commit dc92672
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 11 deletions.
8 changes: 1 addition & 7 deletions lib/client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -167,7 +162,6 @@ impl OpenBookClient {
owner: owner.pubkey(),
open_orders_indexer,
payer: payer.pubkey(),
market,
system_program: System::id(),
},
None,
Expand Down
1 change: 0 additions & 1 deletion programs/openbook-v2/fuzz/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::state::{Market, OpenOrdersIndexer};
use crate::state::OpenOrdersIndexer;
use anchor_lang::prelude::*;

#[derive(Accounts)]
Expand All @@ -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>,
}
1 change: 0 additions & 1 deletion programs/openbook-v2/tests/program_test/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
};

Expand Down

0 comments on commit dc92672

Please sign in to comment.