Skip to content

Commit

Permalink
corrected comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor committed Oct 23, 2023
1 parent c51bb00 commit de03616
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/app/redux/orderBookSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ export function toOrderBookRowProps(
side: "sell" | "buy",
grouping: number
): OrderBookRowProps[] {
// this will drop the rows that do not fit into 8 buys/sells
// TODO: implement pagination or scrolling

const props: OrderBookRowProps[] = [];
let adexRows = [...adexOrderbookLines]; // copy the array so we can mutate it

Expand Down Expand Up @@ -79,7 +76,7 @@ export function toOrderBookRowProps(
}
}
if (groupedArray != null) {
adexRows = groupedArray.slice(0, 11); //adexRows.slice(0, 11); // Limit to 8 rows
adexRows = groupedArray.slice(0, 11); //adexRows.slice(0, 11); // Limit to 11 rows
} else {
adexRows = adexRows.slice(0, 11);
}
Expand All @@ -103,7 +100,7 @@ export function toOrderBookRowProps(
props[i].maxTotal = maxTotal;
}

// If there are fewer than 8 orders, fill the remaining rows with empty values
// If there are fewer than 11 orders, fill the remaining rows with empty values
while (props.length < 11) {
props.push({ absentOrders: "\u00A0" });
}
Expand Down

0 comments on commit de03616

Please sign in to comment.