Skip to content

Commit

Permalink
cloud_functions: Skip tokens in notional-transferred-to function (wor…
Browse files Browse the repository at this point in the history
  • Loading branch information
kev1n-peters authored May 3, 2022
1 parent 7b9a6f8 commit fb0bf2c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions event_database/cloud_functions/notional-transferred-to.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
Expand Down Expand Up @@ -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}
}
Expand Down

0 comments on commit fb0bf2c

Please sign in to comment.