diff --git a/app/orders/columns.tsx b/app/orders/columns.tsx index 354917f4..fc1f3869 100644 --- a/app/orders/columns.tsx +++ b/app/orders/columns.tsx @@ -106,7 +106,7 @@ export const columns: ColumnDef[] = [ accessorKey: "state", header: () =>
Status
, cell: function Cell({ row }) { - const { data: isCapitalized } = useBackOfQueueWallet({ + const { data: isUndercapitalized } = useBackOfQueueWallet({ query: { select: (data) => data.balances.some( @@ -115,12 +115,12 @@ export const columns: ColumnDef[] = [ (row.original.data.side === "Buy" ? row.original.data.quote_mint : row.original.data.base_mint) && - balance.amount > BigInt(0), + balance.amount > row.original.data.amount, ), }, }) let status: string = formatOrderState[row.getValue("status")] - if (!isCapitalized && status === "Open") { + if (!isUndercapitalized && status === "Open") { status = "Undercapitalized" } return
{status}