1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

fixed PoolTransactions history refresh from history and asset detail transactions (#427)

This commit is contained in:
Bogdan Fazakas 2021-03-09 18:46:43 +02:00 committed by GitHub
parent 7356981350
commit a137177be6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -150,8 +150,7 @@ function Title({ row }: { row: TransactionHistoryPoolTransactions }) {
) : null
}
function getColumns(minimal?: boolean) {
return [
const columns = [
{
name: 'Title',
selector: function getTitleRow(row: TransactionHistoryPoolTransactions) {
@ -166,8 +165,7 @@ function getColumns(minimal?: boolean) {
.replace('0x', 'did:op:')
return <AssetTitle did={did} />
},
omit: minimal
}
},
{
name: 'Time',
@ -183,8 +181,10 @@ function getColumns(minimal?: boolean) {
},
maxWidth: '10rem'
}
]
}
]
// hack! if we use a function to omit one field this will display a strange refresh to the enduser for each row
const columnsMinimal = [columns[0], columns[2]]
export default function PoolTransactions({
poolAddress,
@ -214,7 +214,7 @@ export default function PoolTransactions({
return (
<Table
columns={getColumns(minimal)}
columns={minimal ? columnsMinimal : columns}
data={logs}
isLoading={loading}
noTableHead={minimal}