1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-30 22:01:44 +02: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 ) : null
} }
function getColumns(minimal?: boolean) { const columns = [
return [
{ {
name: 'Title', name: 'Title',
selector: function getTitleRow(row: TransactionHistoryPoolTransactions) { selector: function getTitleRow(row: TransactionHistoryPoolTransactions) {
@ -166,8 +165,7 @@ function getColumns(minimal?: boolean) {
.replace('0x', 'did:op:') .replace('0x', 'did:op:')
return <AssetTitle did={did} /> return <AssetTitle did={did} />
}, }
omit: minimal
}, },
{ {
name: 'Time', name: 'Time',
@ -183,8 +181,10 @@ function getColumns(minimal?: boolean) {
}, },
maxWidth: '10rem' 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({ export default function PoolTransactions({
poolAddress, poolAddress,
@ -214,7 +214,7 @@ export default function PoolTransactions({
return ( return (
<Table <Table
columns={getColumns(minimal)} columns={minimal ? columnsMinimal : columns}
data={logs} data={logs}
isLoading={loading} isLoading={loading}
noTableHead={minimal} noTableHead={minimal}