Skip to content

Commit

Permalink
Adxcg Bid Adapter : remove transformBidParams function (#11523)
Browse files Browse the repository at this point in the history
* Update adxcgBidAdapter.js

fix adxcgBidAdapter - removed transformBidParams

* Update adxcgBidAdapter_spec.js

removed deprecated params
  • Loading branch information
adxcgcom authored and Marcin Komorski committed May 21, 2024
1 parent a20163d commit b44be90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 32 deletions.
11 changes: 1 addition & 10 deletions modules/adxcgBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// jshint esversion: 6, es3: false, node: true
import { ortbConverter } from '../libraries/ortbConverter/converter.js';
import { convertTypes } from '../libraries/transformParamsUtils/convertTypes.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
import {
Expand All @@ -17,7 +16,7 @@ const BIDDER_CODE = 'adxcg';
const SECURE_BID_URL = 'https://pbc.adxcg.net/rtb/ortb/pbc?adExchangeId=1';

const DEFAULT_CURRENCY = 'EUR';
const KNOWN_PARAMS = ['cp', 'ct', 'cf', 'battr', 'deals'];
const KNOWN_PARAMS = ['battr', 'deals'];
const DEFAULT_TMAX = 500;

/**
Expand Down Expand Up @@ -88,14 +87,6 @@ export const spec = {
if (bid.nurl) {
triggerPixel(replaceAuctionPrice(bid.nurl, bid.originalCpm))
}
},
transformBidParams: function (params) {
return convertTypes({
'cf': 'string',
'cp': 'number',
'ct': 'number',
'adzoneid': 'string'
}, params);
}
};

Expand Down
23 changes: 1 addition & 22 deletions test/spec/modules/adxcgBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ describe('adxcg v8 oRtbConverter Adapter Tests', function () {
},
bidId: 'bid12345',
params: {
cp: 'p10000',
ct: 't10000',
cf: '300x250',
adzoneid: '77'
}
}, {
Expand All @@ -118,9 +115,6 @@ describe('adxcg v8 oRtbConverter Adapter Tests', function () {
},
bidId: 'bid23456',
params: {
cp: 'p10000',
ct: 't20000',
cf: '728x90',
adzoneid: '77'
}
}];
Expand Down Expand Up @@ -160,8 +154,7 @@ describe('adxcg v8 oRtbConverter Adapter Tests', function () {
},
nativeOrtbRequest,
params: {
cp: 'p10000',
ct: 't10000',

adzoneid: '77'
}
}];
Expand All @@ -182,8 +175,6 @@ describe('adxcg v8 oRtbConverter Adapter Tests', function () {
}
},
params: {
cp: 'p10000',
ct: 't10000',
adzoneid: '77'
}
}];
Expand All @@ -196,9 +187,6 @@ describe('adxcg v8 oRtbConverter Adapter Tests', function () {
},
bidId: 'bid12345',
params: {
cp: 'p10000',
ct: 't10000',
cf: '1x1',
adzoneid: '77',
extra_key1: 'extra_val1',
extra_key2: 12345,
Expand All @@ -219,9 +207,6 @@ describe('adxcg v8 oRtbConverter Adapter Tests', function () {
},
bidId: 'bid12345',
params: {
cp: 'p10000',
ct: 't10000',
cf: '1x1',
adzoneid: '77',
bcat: ['IAB-1', 'IAB-20'],
battr: [1, 2, 3],
Expand Down Expand Up @@ -259,18 +244,15 @@ describe('adxcg v8 oRtbConverter Adapter Tests', function () {
// site object
expect(ortbRequest.site).to.not.equal(null);
expect(ortbRequest.site.publisher).to.not.equal(null);
// expect(ortbRequest.site.publisher.id).to.equal('p10000');
expect(ortbRequest.site.page).to.equal('https://publisher.com/home');
expect(ortbRequest.imp).to.have.lengthOf(2);
// device object
expect(ortbRequest.device).to.not.equal(null);
expect(ortbRequest.device.ua).to.equal(navigator.userAgent);
// slot 1
// expect(ortbRequest.imp[0].tagid).to.equal('t10000');
expect(ortbRequest.imp[0].banner).to.not.equal(null);
expect(ortbRequest.imp[0].banner.format).to.deep.eq([{ 'w': 728, 'h': 90 }, { 'w': 160, 'h': 600 }]);
// slot 2
// expect(ortbRequest.imp[1].tagid).to.equal('t20000');
expect(ortbRequest.imp[1].banner).to.not.equal(null);
expect(ortbRequest.imp[1].banner.format).to.deep.eq([{ 'w': 728, 'h': 90 }]);
});
Expand Down Expand Up @@ -536,7 +518,6 @@ describe('adxcg v8 oRtbConverter Adapter Tests', function () {
page: 'http://pub.com/news',
ref: 'http://google.com',
publisher: {
// id: 'p10000',
domain: 'pub.com'
}
});
Expand All @@ -552,8 +533,6 @@ describe('adxcg v8 oRtbConverter Adapter Tests', function () {
},
bidId: 'bid12345',
params: {
cp: 'p10000',
ct: 't10000',
adzoneid: '77',
extra_key1: 'extra_val1',
extra_key2: 12345
Expand Down

0 comments on commit b44be90

Please sign in to comment.