From 99a165af280584324a074f19abf674481f89aa6c Mon Sep 17 00:00:00 2001 From: Isaac Dettman Date: Thu, 27 Jun 2019 13:10:52 -0700 Subject: [PATCH] Revert "added cur to ortb" This reverts commit 7b70c14750bac886ba7e34c2ccc3189392a1747b. --- modules/prebidServerBidAdapter/index.js | 8 ----- .../modules/prebidServerBidAdapter_spec.js | 31 +------------------ 2 files changed, 1 insertion(+), 38 deletions(-) diff --git a/modules/prebidServerBidAdapter/index.js b/modules/prebidServerBidAdapter/index.js index 1d177464b9f..4ac1bccaeda 100644 --- a/modules/prebidServerBidAdapter/index.js +++ b/modules/prebidServerBidAdapter/index.js @@ -523,14 +523,6 @@ const OPEN_RTB_PROTOCOL = { request.ext.prebid = Object.assign(request.ext.prebid, _s2sConfig.extPrebid); } - /** - * @type {(string[]|undefined)} - OpenRTB property 'cur', currencies available for bids - */ - const adServerCur = config.getConfig('currency.adServerCurrency'); - if (Array.isArray(adServerCur) && adServerCur.length) { - request.cur = adServerCur.slice(); - } - _appendSiteAppDevice(request); const digiTrust = _getDigiTrustQueryParams(bidRequests && bidRequests[0]); diff --git a/test/spec/modules/prebidServerBidAdapter_spec.js b/test/spec/modules/prebidServerBidAdapter_spec.js index 61db09b6451..e2a3a5b111a 100644 --- a/test/spec/modules/prebidServerBidAdapter_spec.js +++ b/test/spec/modules/prebidServerBidAdapter_spec.js @@ -831,36 +831,7 @@ describe('S2S Adapter', function () { expect(requestBid.user.ext.eids.filter(eid => eid.source === 'adserver.org')[0].uids[0].id).is.equal('abc123'); expect(requestBid.user.ext.eids.filter(eid => eid.source === 'pubcommon')).is.not.empty; ; expect(requestBid.user.ext.eids.filter(eid => eid.source === 'pubcommon')[0].uids[0].id).is.equal('1234'); - }); - - it('setting currency.adServerCurrency results in the openRTB JSON containing cur: ["AAA"]', function () { - let ortb2Config = utils.deepClone(CONFIG); - ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction'; - config.setConfig({ - currency: {adServerCurrency: ['USD', 'GB', 'UK', 'AU']}, - s2sConfig: ortb2Config - }); - - const userIdBidRequest = utils.deepClone(BID_REQUESTS); - adapter.callBids(REQUEST, userIdBidRequest, addBidResponse, done, ajax); - - const parsedRequestBody = JSON.parse(requests[0].requestBody); - expect(parsedRequestBody.cur).to.deep.equal(['USD', 'GB', 'UK', 'AU']); - }); - - it('when currency.adServerCurrency is unset, the OpenRTB JSON should not contain cur', function () { - let ortb2Config = utils.deepClone(CONFIG); - ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction'; - config.setConfig({ - s2sConfig: ortb2Config - }); - - const userIdBidRequest = utils.deepClone(BID_REQUESTS); - adapter.callBids(REQUEST, userIdBidRequest, addBidResponse, done, ajax); - - const parsedRequestBody = JSON.parse(requests[0].requestBody); - expect(typeof parsedRequestBody.cur).to.equal('undefined'); - }); + }) it('always add ext.prebid.targeting.includebidderkeys: false for ORTB', function () { const s2sConfig = Object.assign({}, CONFIG, {