-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prebid Core: Fix wrong targeting being applied when multibid module i…
…s included (#12716) * 12238 - Azerion / Improve: does not properly support currency module * **Type:** Fix * **Scope:** improvedigitalBidAdapter * **Subject:** Bid floors are always converted to USD. * **Details:** * Adds `DEFAULT_CURRENCY` variable which is set to USD * Adds `convertBidFloorCurrency` function which in used to convert the bid floor when both `imp.bidfloor` and `imp.bidfloorcur` are present, and `imp.bidfloorcur` is not equal to the adapter's `DEFAULT_CURRENCY`; * **Breaks:** N/A * restored accidentally discarded change from unit test expect * * Modifies behavior to pass bid floor as is when it cannot be converted to USD; * Removes rounding of bid floor when converting its currency to USD; * remove unnecessary uses of `toUpperCase()` * * fix `convertCurrency` mock * remove redundant checks for type and NaN from `convertBidFloorCurrency` function * Restores the logic of choosing the winning bid for targeting inside getWinningBids instead of the using the hookable getHighestCpmBidsFromBidPool which has a logic to return bids unchanged, to sort them causing wrong targeting being applied when multibid module is included. * Adds unit test --------- Co-authored-by: Lyubomir Shishkov <[email protected]> Co-authored-by: Jozef Bartek <[email protected]> Co-authored-by: Catalin Ciocov <[email protected]>
- Loading branch information
1 parent
47678b4
commit 0c1a859
Showing
2 changed files
with
49 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters