Skip to content

Commit

Permalink
fix place_take_order
Browse files Browse the repository at this point in the history
  • Loading branch information
binyebarwe committed Dec 31, 2023
1 parent e4c6318 commit 8678247
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
6 changes: 1 addition & 5 deletions programs/openbook-v2/src/instructions/place_take_order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ use crate::state::*;
use crate::token_utils::*;

#[allow(clippy::too_many_arguments)]
pub fn place_take_order<'info>(
ctx: Context<'_, '_, '_, 'info, <'info>>,
order: Order,
limit: u8,
) -> Result<()> {
pub fn place_take_order(ctx: Context<PlaceTakeOrder>, order: Order, limit: u8) -> Result<()> {
require_gte!(order.max_base_lots, 0, OpenBookError::InvalidInputLots);
require_gte!(
order.max_quote_lots_including_fees,
Expand Down
5 changes: 1 addition & 4 deletions programs/openbook-v2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,7 @@ pub mod openbook_v2 {
/// add a new order off the book.
///
/// This type of order allows for instant token settlement for the taker.
pub fn place_take_order<'info>(
ctx: Context<'_, '_, '_, 'info, PlaceTakeOrder<'info>>,
args: PlaceTakeOrderArgs,
) -> Result<()> {
pub fn place_take_order(ctx: Context<PlaceTakeOrder>, args: PlaceTakeOrderArgs) -> Result<()> {
require_gte!(args.price_lots, 1, OpenBookError::InvalidInputPriceLots);

let order = Order {
Expand Down

0 comments on commit 8678247

Please sign in to comment.