|
1 | 1 | import {find} from '../src/polyfill.js';
|
2 | 2 | import {
|
3 |
| - _map, |
4 | 3 | cleanObj,
|
5 | 4 | deepAccess,
|
6 | 5 | deepClone,
|
@@ -570,6 +569,7 @@ function _parseNativeBidResponse(bid) {
|
570 | 569 | bid.native = native
|
571 | 570 | }
|
572 | 571 |
|
| 572 | +// bidRequest param must be the `bidRequest` object with the original `auctionId` value. |
573 | 573 | function _getFloors(bidRequest) {
|
574 | 574 | if (!isFn(bidRequest.getFloor)) {
|
575 | 575 | return false;
|
@@ -996,7 +996,7 @@ export const spec = {
|
996 | 996 |
|
997 | 997 | const aucId = generateUUID()
|
998 | 998 |
|
999 |
| - const adUnits = _map(validBidRequests, (rawBidRequest) => { |
| 999 | + const adUnits = validBidRequests.map(rawBidRequest => { |
1000 | 1000 | const bidRequest = deepClone(rawBidRequest);
|
1001 | 1001 |
|
1002 | 1002 | // Fix https://github.com/prebid/Prebid.js/issues/9781
|
@@ -1068,7 +1068,10 @@ export const spec = {
|
1068 | 1068 | });
|
1069 | 1069 |
|
1070 | 1070 | // Handle priceFloors module
|
1071 |
| - const computedFloors = _getFloors(bidRequest); |
| 1071 | + // We need to use `rawBidRequest` as param because: |
| 1072 | + // - adagioBidAdapter generates its own auctionId due to transmitTid activity limitation (see https://github.com/prebid/Prebid.js/pull/10079) |
| 1073 | + // - the priceFloors.getFloor() uses a `_floorDataForAuction` map to store the floors based on the auctionId. |
| 1074 | + const computedFloors = _getFloors(rawBidRequest); |
1072 | 1075 | if (isArray(computedFloors) && computedFloors.length) {
|
1073 | 1076 | bidRequest.floors = computedFloors
|
1074 | 1077 |
|
@@ -1149,7 +1152,7 @@ export const spec = {
|
1149 | 1152 | });
|
1150 | 1153 |
|
1151 | 1154 | // Build one request per organizationId
|
1152 |
| - const requests = _map(Object.keys(groupedAdUnits), organizationId => { |
| 1155 | + const requests = Object.keys(groupedAdUnits).map(organizationId => { |
1153 | 1156 | return {
|
1154 | 1157 | method: 'POST',
|
1155 | 1158 | url: ENDPOINT,
|
|
0 commit comments