Skip to content

Commit

Permalink
deleted bidder name check (prebid#12157)
Browse files Browse the repository at this point in the history
Co-authored-by: Octavia Suceava <[email protected]>
  • Loading branch information
OctaviaS20 and Octavia Suceava authored Aug 21, 2024
1 parent 1231b4c commit 8fe3e53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 2 additions & 5 deletions modules/connatixBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,17 @@ export const spec = {
const bidId = deepAccess(bid, 'bidId');
const mediaTypes = deepAccess(bid, 'mediaTypes', {});
const params = deepAccess(bid, 'params', {});
const bidder = deepAccess(bid, 'bidder');

const hasBidId = Boolean(bidId);
const isValidBidder = (bidder === BIDDER_CODE);
const hasMediaTypes = Boolean(mediaTypes) && (Boolean(mediaTypes[BANNER]) || Boolean(mediaTypes[VIDEO]));
const isValidBanner = validateBanner(mediaTypes);
const isValidVideo = validateVideo(mediaTypes);
const hasRequiredBidParams = Boolean(params.placementId);

const isValid = isValidBidder && hasBidId && hasMediaTypes && isValidBanner && isValidVideo && hasRequiredBidParams;
const isValid = hasBidId && hasMediaTypes && isValidBanner && isValidVideo && hasRequiredBidParams;
if (!isValid) {
logError(
`Invalid bid request:
isValidBidder: ${isValidBidder},
`Invalid bid request:
hasBidId: ${hasBidId},
hasMediaTypes: ${hasMediaTypes},
isValidBanner: ${isValidBanner},
Expand Down
4 changes: 0 additions & 4 deletions test/spec/modules/connatixBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ describe('connatixBidAdapter', function () {
it('Should return true if all required fileds are present', function () {
expect(spec.isBidRequestValid(bid)).to.be.true;
});
it('Should return false if bidder does not correspond', function () {
bid.bidder = 'abc';
expect(spec.isBidRequestValid(bid)).to.be.false;
});
it('Should return false if bidId is missing', function () {
delete bid.bidId;
expect(spec.isBidRequestValid(bid)).to.be.false;
Expand Down

0 comments on commit 8fe3e53

Please sign in to comment.