Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tyleroooo committed Dec 18, 2024
1 parent 57f6c84 commit 69677c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/abacus-ts/calculators/orders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ import { OrderStatus, SubaccountOrder } from '../summaryTypes';

export function calculateOpenOrders(orders: SubaccountOrder[]) {
return orders.filter(
(order) => getSimpleOrderStatus(order.status ?? OrderStatus.Open) === OrderStatus.Open
(order) => order.status == null || getSimpleOrderStatus(order.status) === OrderStatus.Open
);
}

export function calculateOrderHistory(orders: SubaccountOrder[]) {
return orders.filter(
(order) => getSimpleOrderStatus(order.status ?? OrderStatus.Open) !== OrderStatus.Open
(order) => order.status != null && getSimpleOrderStatus(order.status) !== OrderStatus.Open
);
}

Expand Down

0 comments on commit 69677c2

Please sign in to comment.