Skip to content

Commit

Permalink
Merge pull request #4 from yieldmo/FS-7695-schain
Browse files Browse the repository at this point in the history
add stringified schain
  • Loading branch information
MelodyLi2017 authored Oct 21, 2019
2 parents c4820cb + 3e384c9 commit 5a71559
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/yieldmoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ export const spec = {
if (tdid) {
serverRequest.tdid = tdid;
}
if (request.schain) {
serverRequest.schain = JSON.stringify(request.schain);
}
});
serverRequest.p = '[' + serverRequest.p.toString() + ']';
return {
Expand Down
6 changes: 6 additions & 0 deletions test/spec/modules/yieldmoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ describe('YieldmoAdapter', function () {
'consentString': 'BOJ/P2HOJ/P2HABABMAAAAAZ+A=='
}));
});
it('should add schain if it is in the bidRequest', () => {
const schain = {'ver': '1.0', 'complete': 1, 'nodes': [{'asi': 'indirectseller.com', 'sid': '00001', 'hp': 1}]};
bidArray[0].schain = schain;
const request = spec.buildRequests([bidArray[0]]);
expect(request.data.schain).equal(JSON.stringify(schain));
})
});

describe('interpretResponse', function () {
Expand Down

0 comments on commit 5a71559

Please sign in to comment.