From 1ea7283411993695fea189d89cf934944bcef1d9 Mon Sep 17 00:00:00 2001 From: "v.raybaud" Date: Fri, 9 Feb 2024 15:58:40 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20add=20sellerCurrency=20to=20fledge?= =?UTF-8?q?=20auction=20config=20for=20criteo=20bid=20adapter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/criteoBidAdapter.js | 4 +--- test/spec/modules/criteoBidAdapter_spec.js | 8 +++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/criteoBidAdapter.js b/modules/criteoBidAdapter.js index fcf8d2ad953..40d39dc5618 100644 --- a/modules/criteoBidAdapter.js +++ b/modules/criteoBidAdapter.js @@ -298,9 +298,6 @@ export const spec = { if (!sellerSignals.floor && bidRequest.params.bidFloor) { sellerSignals.floor = bidRequest.params.bidFloor; } - if (!sellerSignals.sellerCurrency && bidRequest.params.bidFloorCur) { - sellerSignals.sellerCurrency = bidRequest.params.bidFloorCur; - } if (body?.ext?.sellerSignalsPerImp !== undefined) { const sellerSignalsPerImp = body.ext.sellerSignalsPerImp[bidId]; if (sellerSignalsPerImp !== undefined) { @@ -317,6 +314,7 @@ export const spec = { auctionSignals: {}, decisionLogicUrl: FLEDGE_DECISION_LOGIC_URL, interestGroupBuyers: Object.keys(perBuyerSignals), + sellerCurrency: sellerSignals.currency || '???', }, }); }); diff --git a/test/spec/modules/criteoBidAdapter_spec.js b/test/spec/modules/criteoBidAdapter_spec.js index ce07c6e49bc..4c599550afb 100755 --- a/test/spec/modules/criteoBidAdapter_spec.js +++ b/test/spec/modules/criteoBidAdapter_spec.js @@ -2576,7 +2576,8 @@ describe('The Criteo bidding adapter', function () { sellerSignalsPerImp: { 'test-bidId': { foo2: 'bar2', - } + currency: 'USD' + }, }, }, }, @@ -2646,8 +2647,9 @@ describe('The Criteo bidding adapter', function () { foo: 'bar', foo2: 'bar2', floor: 1, - sellerCurrency: 'EUR', + currency: 'USD', }, + sellerCurrency: 'USD' }, }); expect(interpretedResponse.fledgeAuctionConfigs[1]).to.deep.equal({ @@ -2669,8 +2671,8 @@ describe('The Criteo bidding adapter', function () { sellerSignals: { foo: 'bar', floor: 1, - sellerCurrency: 'EUR', }, + sellerCurrency: '???' }, }); });