From fb0bf2cd7031ae75a6659d154e6dbbae89e12200 Mon Sep 17 00:00:00 2001 From: kev1n-peters <96065607+kev1n-peters@users.noreply.github.com> Date: Tue, 3 May 2022 08:56:28 -0500 Subject: [PATCH] cloud_functions: Skip tokens in notional-transferred-to function (#1146) --- event_database/cloud_functions/notional-transferred-to.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/event_database/cloud_functions/notional-transferred-to.go b/event_database/cloud_functions/notional-transferred-to.go index d5762406b..df5deedd3 100644 --- a/event_database/cloud_functions/notional-transferred-to.go +++ b/event_database/cloud_functions/notional-transferred-to.go @@ -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} }