Skip to content

Commit

Permalink
CORE: add bid to winningBids when marking as used (prebid#9612)
Browse files Browse the repository at this point in the history
* sets bid.status to rendered

* adds winnings bid when marking as used

* updates tests
  • Loading branch information
karimMourra authored Mar 28, 2023
1 parent 33d015d commit bb81403
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Header Bidding Management Library",
"main": "src/prebid.js",
"scripts": {
"serve": "gulp serve",
"test": "gulp test",
"lint": "gulp lint"
},
Expand Down
4 changes: 3 additions & 1 deletion src/prebid.js
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,9 @@ $$PREBID_GLOBAL$$.markWinningBidAsUsed = function (markBidRequest) {
}

if (bids.length > 0) {
bids[0].status = CONSTANTS.BID_STATUS.RENDERED;
const winningBid = bids[0];
auctionManager.addWinningBid(winningBid);
winningBid.status = CONSTANTS.BID_STATUS.RENDERED;
}
};

Expand Down

0 comments on commit bb81403

Please sign in to comment.