Skip to content

Commit

Permalink
send all bid info within the timeout event
Browse files Browse the repository at this point in the history
  • Loading branch information
JulieLorin committed Apr 22, 2022
1 parent 998e934 commit 665ebbe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 1 addition & 7 deletions src/auction.js
Original file line number Diff line number Diff line change
Expand Up @@ -848,13 +848,7 @@ function groupByPlacement(bidsByPlacement, bid) {
function getTimedOutBids(bidderRequests, timelyBidders) {
const timedOutBids = bidderRequests
.map(bid => (bid.bids || []).filter(bid => !timelyBidders.has(bid.bidder)))
.reduce(flatten, [])
.map(bid => ({
bidId: bid.bidId,
bidder: bid.bidder,
adUnitCode: bid.adUnitCode,
auctionId: bid.auctionId,
}));
.reduce(flatten, []);

return timedOutBids;
}
2 changes: 2 additions & 0 deletions test/spec/auctionmanager_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,8 @@ describe('auctionmanager.js', function () {
const timedOutBids = bidTimeoutCall.args[1];
assert.equal(timedOutBids.length, 1);
assert.equal(timedOutBids[0].bidder, BIDDER_CODE1);
// Check that additional properties are available
assert.equal(timedOutBids[0].params.placementId, 'id');

const auctionEndCall = eventsEmitSpy.withArgs(CONSTANTS.EVENTS.AUCTION_END).getCalls()[0];
const auctionProps = auctionEndCall.args[1];
Expand Down

0 comments on commit 665ebbe

Please sign in to comment.