fix nft on updates (#359)

This commit is contained in:
mihaisc 2022-02-24 16:32:25 +02:00 committed by GitHub
parent 648b1edd6f
commit f03dce6497
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,6 +59,7 @@ export function handleMetadataUpdated(event: MetadataUpdated): void {
getId(event.transaction.hash.toHex(), nftAddress)
)
nftUpdate.nft = nft.id
nftUpdate.type = NftUpdateType.METADATA_UPDATED
nftUpdate.userAddress = event.params.updatedBy.toHex()
nftUpdate.assetState = event.params.state
@ -82,6 +83,7 @@ export function handleMetadataState(event: MetadataState): void {
getId(event.transaction.hash.toHex(), nftAddress)
)
nftUpdate.nft = nft.id
nftUpdate.type = NftUpdateType.STATE_UPDATED
nftUpdate.userAddress = event.params.updatedBy.toHex()
nftUpdate.assetState = event.params.state
@ -105,7 +107,7 @@ export function handleTokenUriUpdate(event: TokenURIUpdate): void {
const nftUpdate = new NftUpdate(
getId(event.transaction.hash.toHex(), nftAddress)
)
nftUpdate.nft = nft.id
nftUpdate.type = NftUpdateType.TOKENURI_UPDATED
nftUpdate.userAddress = event.params.updatedBy.toHex()
nftUpdate.tokenUri = nft.tokenUri