Skip to content

Commit

Permalink
client: fix pda seeds in create_open_orders_account
Browse files Browse the repository at this point in the history
  • Loading branch information
Lou-Kamades committed Dec 18, 2023
1 parent 7ba5c1c commit 3b509a0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,18 +202,14 @@ impl OpenBookClient {
name: &str,
) -> 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;

let account = Pubkey::find_program_address(
&[
b"OpenOrdersAccount".as_ref(),
b"OpenOrders".as_ref(),
owner.pubkey().as_ref(),
&account_num.to_le_bytes(),
],
Expand Down

0 comments on commit 3b509a0

Please sign in to comment.