mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
pool transaction history order tweak
This commit is contained in:
parent
01655c883a
commit
6e5754d5d7
@ -76,8 +76,14 @@ export default function PoolTransactions(): ReactElement {
|
||||
if (!ocean || !accountId) return
|
||||
|
||||
const logs = await ocean.pool.getAllPoolLogs(accountId)
|
||||
// limit to 100 latest transactions for now
|
||||
setLogs(logs.slice(0, 99))
|
||||
setLogs(
|
||||
// sort logs by date, newest first
|
||||
logs.sort((a, b) => {
|
||||
if (a.timestamp > b.timestamp) return -1
|
||||
if (a.timestamp < b.timestamp) return 1
|
||||
return 0
|
||||
})
|
||||
)
|
||||
}
|
||||
getLogs()
|
||||
}, [ocean, accountId])
|
||||
|
Loading…
Reference in New Issue
Block a user