Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sehyunc committed Feb 26, 2024
1 parent 35f0695 commit df6421d
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions trade.renegade.fi/components/panels/orders-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -437,26 +437,26 @@ const formatTitle = (orders: Record<OrderId, Order>, order: GlobalOrder) => {
return `Unknown order hash: ${order.id.split("-")[0].toString()}`
}

const formatStatus = (
orders: Record<OrderId, Order>,
counterpartyOrder: GlobalOrder,
savedOrders: LocalOrder[]
): string => {
if (counterpartyOrder.id in orders) {
return "ACTIVE"
}
// const formatStatus = (
// orders: Record<OrderId, Order>,
// counterpartyOrder: GlobalOrder,
// savedOrders: LocalOrder[]
// ): string => {
// if (counterpartyOrder.id in orders) {
// return "ACTIVE"
// }

if (
counterpartyOrder.state === "Cancelled" &&
savedOrders.some(({ id }) => id === counterpartyOrder.id)
) {
return "MATCHED"
}
// if (
// counterpartyOrder.state === "Cancelled" &&
// savedOrders.some(({ id }) => id === counterpartyOrder.id)
// ) {
// return "MATCHED"
// }

if (counterpartyOrder.state === "Cancelled") {
return "CANCELLED"
}
// if (counterpartyOrder.state === "Cancelled") {
// return "CANCELLED"
// }

// Default case for other states
return counterpartyOrder.state.toUpperCase()
}
// // Default case for other states
// return counterpartyOrder.state.toUpperCase()
// }

0 comments on commit df6421d

Please sign in to comment.