Skip to content

Commit c24e36e

Browse files
pm-azhar-mullaKapil Tuptewar
authored andcommitted
Added support for dChain
1 parent 16c5ec9 commit c24e36e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

modules/pubmaticBidAdapter.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,9 @@ export function prepareMetaObject(br, bid, seat) {
10211021
// if (bid.ext.advertiserName) br.meta.advertiserName = bid.ext.advertiserName;
10221022
// if (bid.ext.agencyName) br.meta.agencyName = bid.ext.agencyName;
10231023
// if (bid.ext.brandName) br.meta.brandName = bid.ext.brandName;
1024-
// if (bid.ext.dchain) br.meta.dchain = bid.ext.dchain;
1024+
if (bid.ext && bid.ext.dchain) {
1025+
br.meta.dchain = bid.ext.dchain;
1026+
}
10251027

10261028
const advid = seat || (bid.ext && bid.ext.advid);
10271029
if (advid) {

test/spec/modules/pubmaticBidAdapter_spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4646,7 +4646,7 @@ describe('PubMatic adapter', function () {
46464646
// agencyName: 'agnm',
46474647
// brandId: 'brid',
46484648
// brandName: 'brnm',
4649-
// dchain: 'dc',
4649+
dchain: 'dc',
46504650
// demandSource: 'ds',
46514651
// secondaryCatIds: ['secondaryCatIds']
46524652
}
@@ -4664,7 +4664,7 @@ describe('PubMatic adapter', function () {
46644664
// expect(br.meta.agencyName).to.equal('agnm');
46654665
expect(br.meta.brandId).to.equal('mystartab.com');
46664666
// expect(br.meta.brandName).to.equal('brnm');
4667-
// expect(br.meta.dchain).to.equal('dc');
4667+
expect(br.meta.dchain).to.equal('dc');
46684668
expect(br.meta.demandSource).to.equal(6);
46694669
expect(br.meta.secondaryCatIds).to.be.an('array').with.length.above(0);
46704670
expect(br.meta.secondaryCatIds[0]).to.equal('IAB_CATEGORY');

0 commit comments

Comments
 (0)