cloud_functions: notional-transferred skipTokens support (#1088)
This commit is contained in:
parent
85b6dfc420
commit
e631e32116
|
@ -98,6 +98,10 @@ func createTransfersOfInterval(tbl *bigtable.Table, ctx context.Context, prefix
|
||||||
|
|
||||||
// iterate through the rows and increment the amounts
|
// iterate through the rows and increment the amounts
|
||||||
for _, row := range queryResult {
|
for _, row := range queryResult {
|
||||||
|
if _, ok := tokensToSkip[row.TokenAddress]; ok {
|
||||||
|
// skip blacklisted token
|
||||||
|
continue
|
||||||
|
}
|
||||||
if _, ok := results[dateStr][row.LeavingChain]; !ok {
|
if _, ok := results[dateStr][row.LeavingChain]; !ok {
|
||||||
results[dateStr][row.LeavingChain] = map[string]map[string]float64{"*": {"*": 0}}
|
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
|
// iterate through the rows and increment the count for each index
|
||||||
for _, row := range queryResults {
|
for _, row := range queryResults {
|
||||||
|
if _, ok := tokensToSkip[row.TokenAddress]; ok {
|
||||||
|
// skip blacklisted token
|
||||||
|
continue
|
||||||
|
}
|
||||||
if _, ok := result[row.LeavingChain]; !ok {
|
if _, ok := result[row.LeavingChain]; !ok {
|
||||||
result[row.LeavingChain] = map[string]map[string]float64{"*": {"*": 0}}
|
result[row.LeavingChain] = map[string]map[string]float64{"*": {"*": 0}}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue