From 80d557ece7ae79413755db8021e9fd0559b1954c Mon Sep 17 00:00:00 2001 From: hhhjort <31041505+hhhjort@users.noreply.github.com> Date: Thu, 20 Aug 2020 15:36:33 -0400 Subject: [PATCH] Fixes bug (#1448) * Fixes bug * shortens list --- exchange/exchange.go | 1 + exchange/exchange_test.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/exchange/exchange.go b/exchange/exchange.go index 53f4a7a3e1f..e465a78389b 100644 --- a/exchange/exchange.go +++ b/exchange/exchange.go @@ -76,6 +76,7 @@ type bidResponseWrapper struct { func NewExchange(client *http.Client, cache prebid_cache_client.Client, cfg *config.Configuration, metricsEngine pbsmetrics.MetricsEngine, infos adapters.BidderInfos, gDPR gdpr.Permissions, currencyConverter *currencies.RateConverter) Exchange { e := new(exchange) + e.eeaCountries = make(map[string]struct{}, len(cfg.GDPR.EEACountries)) var s struct{} for _, c := range cfg.GDPR.EEACountries { e.eeaCountries[c] = s diff --git a/exchange/exchange_test.go b/exchange/exchange_test.go index aad448f397f..a6f69f70c59 100644 --- a/exchange/exchange_test.go +++ b/exchange/exchange_test.go @@ -48,6 +48,9 @@ func TestNewExchange(t *testing.T) { ExpectedTimeMillis: 20, }, Adapters: blankAdapterConfig(openrtb_ext.BidderList()), + GDPR: config.GDPR{ + EEACountries: []string{"FIN", "FRA", "GUF"}, + }, } currencyConverter := currencies.NewRateConverter(&http.Client{}, "", time.Duration(0))