Skip to content

Commit

Permalink
Fix price delta being -1 instead of "-" when undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
xbtmatt committed Dec 20, 2024
1 parent 30d017a commit 034cac4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/typescript/frontend/src/app/stats/TableData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const TableData = <T extends DatabaseModels["price_feed"] | DatabaseModel
const fmt = (n: number) => bigNumberFormatter.format(n);
return {
cells: {
delta: (v: T) => deltaByMarket.get(v.market.symbolData.symbol) ?? -1,
delta: (v: T) => deltaByMarket.get(v.market.symbolData.symbol),
price: (v: T) => calculateCurvePrice(v.state).toNumber(),
allTimeVolume: (v: T) => fmt(toNominal(v.state.cumulativeStats.quoteVolume)),
dailyVolume: (v: T) => fmt(toNominal(v.dailyVolume)),
Expand Down Expand Up @@ -82,7 +82,7 @@ export const TableData = <T extends DatabaseModels["price_feed"] | DatabaseModel
</a>
</td>
<td className={getCN(Column.PriceDelta)}>
<PriceDelta delta={Number(cells.delta(row))} />
{cells.delta(row) ? <PriceDelta delta={Number(cells.delta(row))} /> : "-"}
</td>
<td>{row.market.marketID.toString()}</td>
<td className={getCN(Column.Price)}>
Expand Down

0 comments on commit 034cac4

Please sign in to comment.