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 and jorgeluisrocha committed May 18, 2023
1 parent d06c184 commit fdc0ed9
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 fdc0ed9

Please sign in to comment.