diff --git a/src/typescript/frontend/src/app/stats/TableData.tsx b/src/typescript/frontend/src/app/stats/TableData.tsx index 8b47ec8d79..d66879bc63 100644 --- a/src/typescript/frontend/src/app/stats/TableData.tsx +++ b/src/typescript/frontend/src/app/stats/TableData.tsx @@ -75,14 +75,14 @@ export const TableData = {row.market.marketID.toString()} - + {cells.allTimeVolume(row)} {cells.dailyVolume(row)} {cells.tvl(row)} - + {cells.marketCap(row)} diff --git a/src/typescript/frontend/src/components/misc/NominalPriceDisplay.tsx b/src/typescript/frontend/src/components/misc/NominalPriceDisplay.tsx index f81a7dd52b..b45eb9872d 100644 --- a/src/typescript/frontend/src/components/misc/NominalPriceDisplay.tsx +++ b/src/typescript/frontend/src/components/misc/NominalPriceDisplay.tsx @@ -11,7 +11,8 @@ export const PriceColors: { [key in PriceColors]: string } = { }; interface NominalPriceDisplayProps extends HTMLAttributes { - priceQ64: AnyNumber; + price: AnyNumber; + q64?: boolean; decimals?: number; colorFor?: PriceColors; } @@ -22,20 +23,21 @@ interface NominalPriceDisplayProps extends HTMLAttributes { * Visually mutes the insignificant figures and highlights the significant ones. */ export const NominalPriceDisplay = ({ - priceQ64, + price, + q64 = false, decimals = 9, colorFor = "neutral", className, }: NominalPriceDisplayProps) => { - const price = toNominalPrice(priceQ64); - const fixed = price.toFixed(decimals); + const priceOut = q64 ? toNominalPrice(price) : Number(price); + const fixed = priceOut.toFixed(decimals); const firstSigFigOnwards = fixed.match(/[1-9].*/)?.at(0) ?? ""; const beforeSigFig = fixed.slice(0, fixed.length - firstSigFigOnwards.length); const color = PriceColors[colorFor]; return ( <> - {beforeSigFig} - {firstSigFigOnwards} + {beforeSigFig} + {firstSigFigOnwards} ); }; diff --git a/src/typescript/frontend/src/components/pages/emojicoin/components/trade-history/table-row/index.tsx b/src/typescript/frontend/src/components/pages/emojicoin/components/trade-history/table-row/index.tsx index bdaec08c54..cef4355879 100644 --- a/src/typescript/frontend/src/components/pages/emojicoin/components/trade-history/table-row/index.tsx +++ b/src/typescript/frontend/src/components/pages/emojicoin/components/trade-history/table-row/index.tsx @@ -121,10 +121,11 @@ const TableRow = ({ color={item.type === "sell" ? darkColors.pink : darkColors.green} >