Skip to content

Commit

Permalink
v7.4.7
Browse files Browse the repository at this point in the history
  • Loading branch information
LeifuChen authored Jul 21, 2023
2 parents 0351d12 + bda871a commit b116759
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kwenta",
"version": "7.4.6",
"version": "7.4.7",
"description": "Kwenta",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kwenta/app",
"version": "7.4.6",
"version": "7.4.7",
"scripts": {
"dev": "next",
"build": "next build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const TradesHistoryTable: FC<TradesHistoryTableProps> = ({ 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,
Expand Down Expand Up @@ -118,16 +118,13 @@ const TradesHistoryTable: FC<TradesHistoryTableProps> = ({ mobile, display }) =>
header: () => <TableHeader>{t('futures.market.history.amount-label')}</TableHeader>,
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 (
<DirectionalValue negative={negative} normal={normal}>
{formatNumber(numValue, {
minDecimals: numDecimals,
{formatNumber(cellProps.getValue().abs(), {
suggestDecimals: true,
truncateOver: 1e6,
})}{' '}
{normal ? '💀' : ''}
Expand Down

1 comment on commit b116759

@vercel
Copy link

@vercel vercel bot commented on b116759 Jul 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

kwenta – ./packages/app

kwenta-git-main-kwenta.vercel.app
kwenta-kwenta.vercel.app
kwenta.io

Please sign in to comment.