Skip to content

Commit

Permalink
jup test: fix order limit
Browse files Browse the repository at this point in the history
  • Loading branch information
skrrb committed Jan 17, 2024
1 parent 64a2c63 commit 76e76a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/client/src/book.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use openbook_v2::state::{
};

// TODO Adjust this number after doing some calculations
const MAXIMUM_TAKEN_ORDERS: u8 = 8;
pub const MAXIMUM_TAKEN_ORDERS: u8 = 8;
const MAXIMUM_REMAINING_ACCOUNTS: usize = 4;

pub struct Amounts {
Expand Down
5 changes: 3 additions & 2 deletions lib/client/src/jup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,10 @@ impl Amm for OpenBookMarket {
}
}

#[cfg(test)]
#[cfg(all(test, feature = "enable-gpl"))]
mod test {
use super::*;
use crate::book::MAXIMUM_TAKEN_ORDERS;
use anchor_spl::token::spl_token::{
self,
state::{Account as TokenAccount, AccountState},
Expand Down Expand Up @@ -456,7 +457,7 @@ mod test {
max_base_lots,
max_quote_lots_including_fees,
order_type: openbook_v2::state::PlaceOrderType::Market,
limit: u8::MAX,
limit: MAXIMUM_TAKEN_ORDERS,
},
},
),
Expand Down

0 comments on commit 76e76a3

Please sign in to comment.