From a188d3ab85f9f1253fa02791a475afbab843d757 Mon Sep 17 00:00:00 2001 From: Nayan Savla Date: Mon, 24 Apr 2023 10:04:04 -0700 Subject: [PATCH] Sending empty array instead of string. (#9846) --- modules/yieldmoBidAdapter.js | 4 ++-- test/spec/modules/yieldmoBidAdapter_spec.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/yieldmoBidAdapter.js b/modules/yieldmoBidAdapter.js index 508b94853e4..bef453cb4ad 100644 --- a/modules/yieldmoBidAdapter.js +++ b/modules/yieldmoBidAdapter.js @@ -83,7 +83,7 @@ export const spec = { gdprApplies: deepAccess(bidderRequest, 'gdprConsent.gdprApplies') || '', cmp: deepAccess(bidderRequest, 'gdprConsent.consentString') || '', gpp: deepAccess(bidderRequest, 'gppConsent.gppString') || '', - gpp_sid: deepAccess(bidderRequest, 'gppConsent.applicableSections') || '' + gpp_sid: deepAccess(bidderRequest, 'gppConsent.applicableSections') || [] }), us_privacy: deepAccess(bidderRequest, 'uspConsent') || '' }; @@ -525,7 +525,7 @@ function populateOpenRtbGdpr(openRtbRequest, bidderRequest) { deepSetValue(openRtbRequest, 'regs.ext.gdpr', gdpr && gdpr.gdprApplies ? 1 : 0); deepSetValue(openRtbRequest, 'user.ext.consent', gdpr && gdpr.consentString ? gdpr.consentString : ''); } - if (gppsid) { + if (gppsid && gppsid.length > 0) { deepSetValue(openRtbRequest, 'regs.ext.gpp_sid', gppsid); } const uspConsent = deepAccess(bidderRequest, 'uspConsent'); diff --git a/test/spec/modules/yieldmoBidAdapter_spec.js b/test/spec/modules/yieldmoBidAdapter_spec.js index 2199e4d613b..3706f770da8 100644 --- a/test/spec/modules/yieldmoBidAdapter_spec.js +++ b/test/spec/modules/yieldmoBidAdapter_spec.js @@ -212,7 +212,7 @@ describe('YieldmoAdapter', function () { expect(data.hasOwnProperty('h')).to.be.true; expect(data.hasOwnProperty('w')).to.be.true; expect(data.hasOwnProperty('pubcid')).to.be.true; - expect(data.userConsent).to.equal('{"gdprApplies":"","cmp":"","gpp":"","gpp_sid":""}'); + expect(data.userConsent).to.equal('{"gdprApplies":"","cmp":"","gpp":"","gpp_sid":[]}'); expect(data.us_privacy).to.equal(''); }); @@ -263,7 +263,7 @@ describe('YieldmoAdapter', function () { gdprApplies: true, cmp: 'BOJ/P2HOJ/P2HABABMAAAAAZ+A==', gpp: '', - gpp_sid: '', + gpp_sid: [], }) ); });