Skip to content

Commit

Permalink
Merge pull request prebid#16 in SA/prebid from CAP-1636 to master
Browse files Browse the repository at this point in the history
* commit 'c934f2d341bea0938cd5b1b75e62030ce5447117':
  CAP-1636 updated the review comments
  • Loading branch information
Rajkumar Natarajan committed Feb 18, 2020
2 parents 9359953 + c934f2d commit 1e489b0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
11 changes: 4 additions & 7 deletions modules/synacormediaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,9 @@ export const spec = {
imp: []
};

if (bidderRequest !== undefined && bidderRequest.bids !== undefined && bidderRequest.bids[0] !== undefined) {
const schain = bidderRequest.bids[0].schain;
if (schain !== undefined) {
openRtbBidRequest.source = {};
openRtbBidRequest.source.ext = { schain };
}
const schain = validBidReqs[0].schain;
if (schain) {
openRtbBidRequest.source = { ext: { schain } };
}

let seatId = null;
Expand All @@ -67,7 +64,7 @@ export const spec = {
if (isNaN(bidFloor)) {
logWarn(`Synacormedia: there is an invalid bid floor: ${bid.params.bidfloor}`);
}
let pos = parseInt(bid.params.pos);
let pos = parseInt(bid.params.pos, 10);
if (isNaN(pos)) {
logWarn(`Synacormedia: there is an invalid POS: ${bid.params.pos}`);
pos = 0;
Expand Down
13 changes: 12 additions & 1 deletion test/spec/modules/synacormediaBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,18 @@ describe('synacormediaBidAdapter ', function () {
src: 'client',
bidRequestsCount: 1,
bidderRequestsCount: 1,
bidderWinsCount: 0
bidderWinsCount: 0,
schain: {
ver: '1.0',
complete: 1,
nodes: [
{
asi: 'indirectseller.com',
sid: '00001',
hp: 1
}
]
}
};
let bidderRequest = {
refererInfo: {
Expand Down

0 comments on commit 1e489b0

Please sign in to comment.