This commit is contained in:
aozhiwei 2024-06-16 18:31:34 +08:00
parent 9742748b9c
commit 4e9f35300c

View File

@ -139,14 +139,19 @@ func (this *cacheMgr) batchGetNfts(nfts []*common.NftDto) {
} else { } else {
continue continue
} }
this.addNft(netId, contractAddress, tokenId) this.addNft(netId, contractAddress, tokenId, val)
} }
} }
}) })
} }
func (this *cacheMgr) addNft(netId int32, contractAddress string, tokenId string) { func (this *cacheMgr) addNft(netId int32, contractAddress string, tokenId string,
data map[string]interface{}) {
dto := new(common.NftDto) dto := new(common.NftDto)
dto.NetId = netId
dto.ContractAddress = contractAddress
dto.TokenId = tokenId
p := newNft() p := newNft()
p.jsonData = data
this.nftHash.Store(dto.GetKey(), p) this.nftHash.Store(dto.GetKey(), p)
} }