cloud_functions: notional-transferred skipTokens support (#1088)

This commit is contained in:
kev1n-peters 2022-04-18 16:48:14 -05:00 committed by GitHub
parent 85b6dfc420
commit e631e32116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -98,6 +98,10 @@ func createTransfersOfInterval(tbl *bigtable.Table, ctx context.Context, prefix
// iterate through the rows and increment the amounts
for _, row := range queryResult {
if _, ok := tokensToSkip[row.TokenAddress]; ok {
// skip blacklisted token
continue
}
if _, ok := results[dateStr][row.LeavingChain]; !ok {
results[dateStr][row.LeavingChain] = map[string]map[string]float64{"*": {"*": 0}}
}
@ -250,6 +254,10 @@ func transfersForInterval(tbl *bigtable.Table, ctx context.Context, prefix strin
// 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.LeavingChain]; !ok {
result[row.LeavingChain] = map[string]map[string]float64{"*": {"*": 0}}
}