Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bidderSettings: Allow Currency Code control through adjustCurrency #12645

Closed
wants to merge 14 commits into from
3 changes: 2 additions & 1 deletion src/auction.js
Original file line number Diff line number Diff line change
Expand Up @@ -910,8 +910,9 @@ function setKeys(keyValues, bidderSettings, custBidObj, bidReq) {
export function adjustBids(bid) {
let bidPriceAdjusted = adjustCpm(bid.cpm, bid);

if (bidPriceAdjusted >= 0) {
if (bidPriceAdjusted.cpm >= 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests right now are failing because of linting errors, however, I hope they'd fail on this as well. bidPriceAdjusted is the adjusted CPM, on its own this cannot make sense.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dgirardi Kindly check it out again as I reverted bidPriceAdjusted as it was before. Now just fetching the adServerCurrency here for the currency code update

bid.cpm = bidPriceAdjusted;
bid.currency = $$PREBID_GLOBAL$$.getConfig('currency').adServerCurrency;
}
}

Expand Down
Loading