Skip to content

Commit

Permalink
Update cache.go
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbitprincess committed Aug 29, 2023
1 parent 47b09fd commit 517b950
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion indexer/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@ func (ns *Cache) refreshVariables(info BlockInfo, blockDoc *doc.EsBlock, minerGR
// update verify token, contract
ns.idxer.ScrollWhitelist(func(whitelistDoc *doc.EsWhitelist) {
var updateContractAddress string
metadata := minerGRPC.QueryMetadataOf(ns.idxer.tokenVerifyAddr, whitelistDoc.Id)
if whitelistDoc.Type == "token" {
metadata := minerGRPC.QueryMetadataOf(ns.idxer.tokenVerifyAddr, whitelistDoc.Id)
ns.idxer.log.Info().Str("tokenAddress", whitelistDoc.Id).Msg("update verified token")
updateContractAddress = ns.idxer.MinerTokenVerified(whitelistDoc.Id, whitelistDoc.Contract, metadata, minerGRPC)
}
if whitelistDoc.Type == "contract" {
metadata := minerGRPC.QueryMetadataOf(ns.idxer.contractVerifyAddr, whitelistDoc.Id)
ns.idxer.log.Info().Str("tokenAddress", whitelistDoc.Id).Msg("update verified contract")
updateContractAddress = ns.idxer.MinerContractVerified(whitelistDoc.Id, whitelistDoc.Contract, metadata, minerGRPC)
}
Expand Down

0 comments on commit 517b950

Please sign in to comment.