Skip to content

Commit

Permalink
✨ add sellerCurrency to fledge auction config for criteo bid adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
v.raybaud committed Feb 9, 2024
1 parent e41a174 commit 7de9a8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 1 addition & 3 deletions modules/criteoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -317,6 +314,7 @@ export const spec = {
auctionSignals: {},
decisionLogicUrl: FLEDGE_DECISION_LOGIC_URL,
interestGroupBuyers: Object.keys(perBuyerSignals),
sellerCurrency: sellerSignals.currency
},
});
});
Expand Down
7 changes: 4 additions & 3 deletions test/spec/modules/criteoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2576,7 +2576,8 @@ describe('The Criteo bidding adapter', function () {
sellerSignalsPerImp: {
'test-bidId': {
foo2: 'bar2',
}
currency: 'USD'
},
},
},
},
Expand Down Expand Up @@ -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({
Expand All @@ -2669,7 +2671,6 @@ describe('The Criteo bidding adapter', function () {
sellerSignals: {
foo: 'bar',
floor: 1,
sellerCurrency: 'EUR',
},
},
});
Expand Down

0 comments on commit 7de9a8e

Please sign in to comment.