diff --git a/web/pages/leaderboards.tsx b/web/pages/leaderboards.tsx index c8989dd9..bc116a01 100644 --- a/web/pages/leaderboards.tsx +++ b/web/pages/leaderboards.tsx @@ -252,7 +252,7 @@ function TransactionsTable(props: { txns: Transaction[] }) { return ( - cell === 'BUY_LEADERBOARD_SLOT' ? 'Buy' : 'Tax', + formatter: (cell, row) => { + if (cell === 'LEADERBOARD_TAX') { + return 'Tax' + } + + // If newValue === 0 + // @ts-ignore + if (row.cells[6].data?.newValue === 0) { + return 'Sell' + } + + // If fromUser === toUser + if (row.cells[3].data === row.cells[4].data) { + return 'Edit' + } + + return 'Buy' + }, }, { id: 'amount', - name: 'Amount', + name: 'Transfer', formatter: (cell) => formatMoney(cell as number), }, { @@ -290,6 +306,12 @@ function TransactionsTable(props: { txns: Transaction[] }) { )}` ), }, + { + hidden: true, + id: 'data', + name: 'New Value', + formatter: (cell) => (cell as SlotData).newValue ?? '', + }, ]} /> )