From fdc0ed9708026a4c1f797fe0afb768bdfbe34409 Mon Sep 17 00:00:00 2001 From: Karim Mourra Date: Tue, 28 Mar 2023 09:46:01 -0300 Subject: [PATCH] CORE: add bid to winningBids when marking as used (#9612) * sets bid.status to rendered * adds winnings bid when marking as used * updates tests --- package.json | 1 + src/prebid.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 560e952535b..176f496f5cc 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "Header Bidding Management Library", "main": "src/prebid.js", "scripts": { + "serve": "gulp serve", "test": "gulp test", "lint": "gulp lint" }, diff --git a/src/prebid.js b/src/prebid.js index 9ad72409990..70653de0bcb 100644 --- a/src/prebid.js +++ b/src/prebid.js @@ -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; } };