mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Removing showing updates on never updated assets (#438)
* removes showing updates on never updated assets * package-lock fix
This commit is contained in:
parent
aa6cceaf0e
commit
c9a8345222
2
.husky/.gitignore
vendored
2
.husky/.gitignore
vendored
@ -1 +1 @@
|
||||
_
|
||||
_
|
||||
|
@ -10,8 +10,6 @@ import { ReceiptData_datatokens_updates as ReceiptData } from '../../../@types/a
|
||||
const getReceipts = gql`
|
||||
query ReceiptData($address: ID!) {
|
||||
datatokens(where: { id: $address }) {
|
||||
createTime
|
||||
tx
|
||||
updates(orderBy: timestamp, orderDirection: desc) {
|
||||
id
|
||||
tx
|
||||
@ -33,8 +31,15 @@ export default function EditHistory(): ReactElement {
|
||||
|
||||
useEffect(() => {
|
||||
if (!data || data.datatokens.length === 0) return
|
||||
setReceipts(data.datatokens[0].updates)
|
||||
setCreationTx(data.datatokens[0].tx)
|
||||
|
||||
const receiptCollectionLength = data.datatokens[0].updates.length
|
||||
const creationData = data.datatokens[0].updates[receiptCollectionLength - 1]
|
||||
setCreationTx(creationData.tx)
|
||||
|
||||
const receiptCollection = [...data.datatokens[0].updates]
|
||||
receiptCollection.splice(-1, 1)
|
||||
|
||||
setReceipts(receiptCollection)
|
||||
}, [data])
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user