Skip to content

Commit

Permalink
Mediafuse Bid Adapter : remove transformBidParams function (prebid#11534
Browse files Browse the repository at this point in the history
)

* removed transformBidParams function

* fix lint issues

---------

Co-authored-by: Chris Huie <[email protected]>
  • Loading branch information
balajimediafuse and ChrisHuie authored May 21, 2024
1 parent 39787dc commit 8590378
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions modules/mediafuseBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ import {convertOrtbRequestToProprietaryNative} from '../src/native.js';
import {APPNEXUS_CATEGORY_MAPPING} from '../libraries/categoryTranslationMapping/index.js';
import {
getANKewyordParamFromMaps,
getANKeywordParam,
transformBidderParamKeywords
getANKeywordParam
} from '../libraries/appnexusUtils/anKeywords.js';
import {convertCamelToUnderscore, fill} from '../libraries/appnexusUtils/anUtils.js';
import {convertTypes} from '../libraries/transformParamsUtils/convertTypes.js';
import {chunk} from '../libraries/chunk/chunk.js';

/**
Expand Down Expand Up @@ -351,31 +349,6 @@ export const spec = {
}
},

transformBidParams: function (params, isOpenRtb) {
params = convertTypes({
'member': 'string',
'invCode': 'string',
'placementId': 'number',
'keywords': transformBidderParamKeywords,
'publisherId': 'number'
}, params);

if (isOpenRtb) {
params.use_pmt_rule = (typeof params.usePaymentRule === 'boolean') ? params.usePaymentRule : false;
if (params.usePaymentRule) { delete params.usePaymentRule; }

Object.keys(params).forEach(paramKey => {
let convertedKey = convertCamelToUnderscore(paramKey);
if (convertedKey !== paramKey) {
params[convertedKey] = params[paramKey];
delete params[paramKey];
}
});
}

return params;
},

/**
* Add element selector to javascript tracker to improve native viewability
* @param {Bid} bid
Expand Down

0 comments on commit 8590378

Please sign in to comment.