Skip to content

Commit

Permalink
Merge pull request #2112 from get10101/fix/only-return-open-orders
Browse files Browse the repository at this point in the history
fix(orderbook): Only return open orders
  • Loading branch information
holzeis authored Feb 28, 2024
2 parents dba5c6c + c0cf807 commit 1b0258a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coordinator/src/orderbook/db/orders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ pub fn all_limit_orders(conn: &mut PgConnection) -> QueryResult<Vec<OrderbookOrd
let orders = orders::table
.filter(orders::order_type.eq(OrderType::Limit))
.filter(orders::expiry.gt(OffsetDateTime::now_utc()))
.filter(orders::order_state.ne(OrderState::Failed))
.filter(orders::order_state.eq(OrderState::Open))
.load::<Order>(conn)?;

Ok(orders.into_iter().map(OrderbookOrder::from).collect())
Expand Down

0 comments on commit 1b0258a

Please sign in to comment.