diff --git a/modules/yieldmoBidAdapter.js b/modules/yieldmoBidAdapter.js index 725a361789b..22b20511daf 100644 --- a/modules/yieldmoBidAdapter.js +++ b/modules/yieldmoBidAdapter.js @@ -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 { diff --git a/test/spec/modules/yieldmoBidAdapter_spec.js b/test/spec/modules/yieldmoBidAdapter_spec.js index 78cddf44e38..f143caa8c1e 100644 --- a/test/spec/modules/yieldmoBidAdapter_spec.js +++ b/test/spec/modules/yieldmoBidAdapter_spec.js @@ -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 () {