cloud_functions: Skip tokens in notional-transferred-to function (#1146)

This commit is contained in:
kev1n-peters 2022-05-03 08:56:28 -05:00 committed by GitHub
parent 7b9a6f8eb0
commit fb0bf2cd70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -190,6 +190,10 @@ func amountsTransferredToInInterval(tbl *bigtable.Table, ctx context.Context, pr
// iterate through the rows and increment the count
for _, row := range queryResult {
if _, ok := tokensToSkip[row.TokenAddress]; ok {
// skip blacklisted token
continue
}
if _, ok := results[dateStr][row.DestinationChain]; !ok {
results[dateStr][row.DestinationChain] = map[string]float64{"*": 0}
}
@ -283,6 +287,10 @@ func transfersToForInterval(tbl *bigtable.Table, ctx context.Context, prefix str
// iterate through the rows and increment the count for each index
for _, row := range queryResults {
if _, ok := tokensToSkip[row.TokenAddress]; ok {
// skip blacklisted token
continue
}
if _, ok := result[row.DestinationChain]; !ok {
result[row.DestinationChain] = map[string]float64{"*": 0}
}