From efec1eb9061bc140df78d487a0c02bc94e1b818e Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Wed, 9 Nov 2022 10:51:03 +0100 Subject: [PATCH] Test fixes --- programs/mango-v4/src/state/orderbook/mod.rs | 6 ++++++ programs/mango-v4/tests/program_test/mango_client.rs | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/programs/mango-v4/src/state/orderbook/mod.rs b/programs/mango-v4/src/state/orderbook/mod.rs index fcb2fa423..dc2d0ae4e 100644 --- a/programs/mango-v4/src/state/orderbook/mod.rs +++ b/programs/mango-v4/src/state/orderbook/mod.rs @@ -101,6 +101,7 @@ mod tests { max_quote_lots: i64::MAX, client_order_id: 0, time_in_force, + reduce_only: false, params: OrderParams::Fixed { price_lots, order_type: PostOrderType::Limit, @@ -208,6 +209,7 @@ mod tests { max_quote_lots: i64::MAX, client_order_id: 42, time_in_force: 0, + reduce_only: false, params: OrderParams::Fixed { price_lots, order_type: PostOrderType::Limit, @@ -267,6 +269,7 @@ mod tests { max_quote_lots: i64::MAX, client_order_id: 43, time_in_force: 0, + reduce_only: false, params: OrderParams::Fixed { price_lots, order_type: PostOrderType::Limit, @@ -388,6 +391,7 @@ mod tests { max_quote_lots: i64::MAX, client_order_id: 43, time_in_force: 0, + reduce_only: false, params: OrderParams::Fixed { price_lots: 1000, order_type: PostOrderType::Limit, @@ -411,6 +415,7 @@ mod tests { max_quote_lots: i64::MAX, client_order_id: 43, time_in_force: 0, + reduce_only: false, params: OrderParams::Fixed { price_lots: 1000, order_type: PostOrderType::Limit, @@ -448,6 +453,7 @@ mod tests { max_quote_lots: i64::MAX, client_order_id: 43, time_in_force: 0, + reduce_only: false, params: OrderParams::ImmediateOrCancel { price_lots: 1000 }, }, &mut market, diff --git a/programs/mango-v4/tests/program_test/mango_client.rs b/programs/mango-v4/tests/program_test/mango_client.rs index 065b266e8..067283e5d 100644 --- a/programs/mango-v4/tests/program_test/mango_client.rs +++ b/programs/mango-v4/tests/program_test/mango_client.rs @@ -2411,7 +2411,7 @@ impl ClientInstruction for PerpPlaceOrderInstruction { max_base_lots: self.max_base_lots, max_quote_lots: self.max_quote_lots, client_order_id: self.client_order_id, - order_type: OrderType::Limit, + order_type: PlaceOrderType::Limit, reduce_only: false, expiry_timestamp: 0, limit: 10, @@ -2479,6 +2479,7 @@ impl ClientInstruction for PerpPlaceOrderPeggedInstruction { max_quote_lots: self.max_quote_lots, client_order_id: self.client_order_id, order_type: PlaceOrderType::Limit, + reduce_only: false, expiry_timestamp: 0, limit: 10, };