mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
fix nft on updates (#359)
This commit is contained in:
parent
648b1edd6f
commit
f03dce6497
@ -59,6 +59,7 @@ export function handleMetadataUpdated(event: MetadataUpdated): void {
|
|||||||
getId(event.transaction.hash.toHex(), nftAddress)
|
getId(event.transaction.hash.toHex(), nftAddress)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
nftUpdate.nft = nft.id
|
||||||
nftUpdate.type = NftUpdateType.METADATA_UPDATED
|
nftUpdate.type = NftUpdateType.METADATA_UPDATED
|
||||||
nftUpdate.userAddress = event.params.updatedBy.toHex()
|
nftUpdate.userAddress = event.params.updatedBy.toHex()
|
||||||
nftUpdate.assetState = event.params.state
|
nftUpdate.assetState = event.params.state
|
||||||
@ -82,6 +83,7 @@ export function handleMetadataState(event: MetadataState): void {
|
|||||||
getId(event.transaction.hash.toHex(), nftAddress)
|
getId(event.transaction.hash.toHex(), nftAddress)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
nftUpdate.nft = nft.id
|
||||||
nftUpdate.type = NftUpdateType.STATE_UPDATED
|
nftUpdate.type = NftUpdateType.STATE_UPDATED
|
||||||
nftUpdate.userAddress = event.params.updatedBy.toHex()
|
nftUpdate.userAddress = event.params.updatedBy.toHex()
|
||||||
nftUpdate.assetState = event.params.state
|
nftUpdate.assetState = event.params.state
|
||||||
@ -105,7 +107,7 @@ export function handleTokenUriUpdate(event: TokenURIUpdate): void {
|
|||||||
const nftUpdate = new NftUpdate(
|
const nftUpdate = new NftUpdate(
|
||||||
getId(event.transaction.hash.toHex(), nftAddress)
|
getId(event.transaction.hash.toHex(), nftAddress)
|
||||||
)
|
)
|
||||||
|
nftUpdate.nft = nft.id
|
||||||
nftUpdate.type = NftUpdateType.TOKENURI_UPDATED
|
nftUpdate.type = NftUpdateType.TOKENURI_UPDATED
|
||||||
nftUpdate.userAddress = event.params.updatedBy.toHex()
|
nftUpdate.userAddress = event.params.updatedBy.toHex()
|
||||||
nftUpdate.tokenUri = nft.tokenUri
|
nftUpdate.tokenUri = nft.tokenUri
|
||||||
|
Loading…
Reference in New Issue
Block a user