Skip to content

Commit

Permalink
Updating tokenStandard
Browse files Browse the repository at this point in the history
  • Loading branch information
Hrishikesh-Thakkar committed Mar 16, 2024
1 parent 7b791c8 commit 4ecf7cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions airstack-modules/modules/airstack/dynamic-nft/dynamic-nft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,9 @@ function createOrUpdateAirNftTokenURIUpdateTransaction(
entity.nft = nft.id
entity.tokenAddress = nft.id
entity.tokenId = tokenId
entity.tokenStandard = tokenStandard
entity.protocolType = protocolType
entity.protocolActionType = protocolActionType
let dynmaicNft = createOrUpdateAirDynamicNFTUpdate(chainId, block, tokenAddress, tokenId)
let dynmaicNft = createOrUpdateAirDynamicNFTUpdate(chainId, block, tokenAddress, tokenId, tokenStandard)
entity.nft = dynmaicNft.id
}
entity.index = updateAirEntityCounter(AIR_DYNAMIC_NFT_UPDATE_TRANSACTION_COUNTER_ID, block)
Expand All @@ -110,6 +109,7 @@ function createOrUpdateAirDynamicNFTUpdate(
block: AirBlock,
tokenAddress: string,
tokenId: string,
tokenStandard: string,
): AirNFT {
const id = GetAirDynamicNFTUpdateEntityId(chainId, tokenAddress, tokenId)
let entity = AirNFT.load(id)
Expand All @@ -120,6 +120,7 @@ function createOrUpdateAirDynamicNFTUpdate(
nft.save()
entity.tokenAddress = nft.id
entity.tokenId = tokenId
entity.tokenStandard = tokenStandard
}
entity.lastUpdatedIndex = updateAirEntityCounter(AIR_DYNAMIC_NFT_UPDATE_COUNTER_ID, block)
entity.lastUpdatedAt = block.id
Expand Down

0 comments on commit 4ecf7cb

Please sign in to comment.