diff --git a/src/app/components/OrderBook.tsx b/src/app/components/OrderBook.tsx index 6029f678..e055de2a 100644 --- a/src/app/components/OrderBook.tsx +++ b/src/app/components/OrderBook.tsx @@ -61,12 +61,16 @@ function CurrentPriceRow() { ); let spreadString = ""; + let spreadValue = ""; // checking for past trades here because adexState.currentPairInfo.lastPrice // is never null, and is = -1 if there were no trades let lastPrice = ""; if (trades.length > 0) { - lastPrice = orderBook.lastPrice?.toLocaleString() || ""; + lastPrice = utils.displayNumber( + orderBook.lastPrice || 0, + CHARACTERS_TO_DISPLAY + ); } else { lastPrice = "No trades have occurred yet"; } @@ -86,26 +90,28 @@ function CurrentPriceRow() { 2 ); - spreadString = `${spread} (${spreadPercent}%)`; + spreadString = `${spreadPercent}%`; + spreadValue = `Spread ${spread}`; } return ( <> -
+
{lastPrice}
-
- Spread{" "} - - {spreadString} - +
+
+ + {spreadString} + +
); } else { return ( -
+
{lastPrice}
);