diff --git a/centrifuge-app/src/components/Report/AssetTransactions.tsx b/centrifuge-app/src/components/Report/AssetTransactions.tsx index 86209f59ec..e8daefb6de 100644 --- a/centrifuge-app/src/components/Report/AssetTransactions.tsx +++ b/centrifuge-app/src/components/Report/AssetTransactions.tsx @@ -1,7 +1,8 @@ import { Pool } from '@centrifuge/centrifuge-js' -import { formatBalance, useGetExplorerUrl } from '@centrifuge/centrifuge-react' +import { useGetExplorerUrl } from '@centrifuge/centrifuge-react' import { Box, IconAnchor, IconExternalLink, Text } from '@centrifuge/fabric' import * as React from 'react' +import { formatBalance } from '../../../src/utils/formatting' import { formatDate } from '../../utils/date' import { getCSVDownloadUrl } from '../../utils/getCSVDownloadUrl' import { useAssetTransactions } from '../../utils/usePools' @@ -21,53 +22,35 @@ export function AssetTransactions({ pool }: { pool: Pool }) { const columnConfig = [ { - header: 'Asset ID', - align: 'center', - csvOnly: false, - formatter: noop, - width: '80px', - }, - { - header: 'Asset name', - align: 'left', - csvOnly: false, - formatter: noop, - }, - { - header: 'Epoch', - align: 'center', - csvOnly: false, - formatter: noop, - }, - { - header: 'Date', + header: 'Transaction date', align: 'left', csvOnly: false, formatter: formatDate, }, { - header: 'Transaction type', + header: 'Transaction', align: 'left', csvOnly: false, formatter: noop, + width: '38%', }, { - header: 'Currency amount', + header: 'Amount', align: 'left', csvOnly: false, formatter: (v: any) => (typeof v === 'number' ? formatBalance(v, pool.currency.symbol, 2) : '-'), }, { - header: 'Currency', - align: 'left', - csvOnly: true, + header: 'Epoch', + align: 'center', + csvOnly: false, formatter: noop, }, { - header: 'Transaction', + header: 'View transaction', align: 'center', csvOnly: false, - width: '80px', + width: '120px', formatter: (v: any) => ( ({ name: '', value: [ - tx.asset.id.split('-').at(-1)!, - tx.asset.name || `Asset ${tx.asset.id.split('-').at(-1)!}`, - tx.epochId.split('-').at(-1)!, tx.timestamp.toISOString(), formatAssetTransactionType(tx.type), tx.amount?.toFloat() ?? '', - pool.currency.symbol, + tx.epochId.split('-').at(-1)!, tx.hash, ], heading: false,