diff --git a/package.json b/package.json index ad3ce447a0..051d675d0c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kwenta", - "version": "7.4.6", + "version": "7.4.7", "description": "Kwenta", "main": "index.js", "scripts": { diff --git a/packages/app/package.json b/packages/app/package.json index c859faa578..dda08880c5 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,6 +1,6 @@ { "name": "@kwenta/app", - "version": "7.4.6", + "version": "7.4.7", "scripts": { "dev": "next", "build": "next build", diff --git a/packages/app/src/sections/futures/TradingHistory/TradesHistoryTable.tsx b/packages/app/src/sections/futures/TradingHistory/TradesHistoryTable.tsx index 2a13b8c3ee..ca9800bc0e 100644 --- a/packages/app/src/sections/futures/TradingHistory/TradesHistoryTable.tsx +++ b/packages/app/src/sections/futures/TradingHistory/TradesHistoryTable.tsx @@ -42,7 +42,7 @@ const TradesHistoryTable: FC = ({ mobile, display }) => .map((trade) => { return { value: Number(trade?.price), - amount: Number(trade?.size), + amount: trade?.size, time: Number(trade?.timestamp), id: trade?.txnHash, orderType: trade?.orderType, @@ -118,16 +118,13 @@ const TradesHistoryTable: FC = ({ mobile, display }) => header: () => {t('futures.market.history.amount-label')}, accessorKey: TableColumnAccessor.Amount, cell: (cellProps) => { - const numValue = Math.abs(cellProps.row.original.amount / 1e18) - const numDecimals = numValue === 0 ? 2 : numValue < 1 ? 4 : numValue >= 100000 ? 0 : 2 - const normal = cellProps.row.original.orderType === 'Liquidation' - const negative = cellProps.row.original.amount > 0 + const negative = cellProps.getValue() > 0 return ( - {formatNumber(numValue, { - minDecimals: numDecimals, + {formatNumber(cellProps.getValue().abs(), { + suggestDecimals: true, truncateOver: 1e6, })}{' '} {normal ? '💀' : ''}