Skip to content

Commit

Permalink
MinuteMedia Bid Adapter: remove multi currency support (prebid#11428)
Browse files Browse the repository at this point in the history
* removed currency from getFloor

* removed currency from generateBidParameters

* removed currency from test

* removed currency from optional params in md

* removed currency
  • Loading branch information
Dedis23 authored and f.caspar committed May 14, 2024
1 parent a38b6dc commit 395bdf8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
10 changes: 4 additions & 6 deletions modules/minutemediaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,16 @@ registerBidder(spec);
* @param bid {bid}
* @returns {Number}
*/
function getFloor(bid, mediaType, currency) {
function getFloor(bid, mediaType) {
if (!isFn(bid.getFloor)) {
return 0;
}
let floorResult = bid.getFloor({
currency: currency,
currency: DEFAULT_CURRENCY,
mediaType: mediaType,
size: '*'
});
return floorResult.currency === currency && floorResult.floor ? floorResult.floor : 0;
return floorResult.currency === DEFAULT_CURRENCY && floorResult.floor ? floorResult.floor : 0;
}

/**
Expand Down Expand Up @@ -286,7 +286,6 @@ function generateBidParameters(bid, bidderRequest) {
const {params} = bid;
const mediaType = isBanner(bid) ? BANNER : VIDEO;
const sizesArray = getSizesArray(bid, mediaType);
const currency = params.currency || config.getConfig('currency.adServerCurrency') || DEFAULT_CURRENCY;

// fix floor price in case of NAN
if (isNaN(params.floorPrice)) {
Expand All @@ -297,8 +296,7 @@ function generateBidParameters(bid, bidderRequest) {
mediaType,
adUnitCode: getBidIdParameter('adUnitCode', bid),
sizes: sizesArray,
currency: currency,
floorPrice: Math.max(getFloor(bid, mediaType, currency), params.floorPrice),
floorPrice: Math.max(getFloor(bid, mediaType), params.floorPrice),
bidId: getBidIdParameter('bidId', bid),
loop: getBidIdParameter('bidderRequestsCount', bid),
bidderRequestId: getBidIdParameter('bidderRequestId', bid),
Expand Down
1 change: 0 additions & 1 deletion modules/minutemediaBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ The adapter supports Video(instream) & Banner.
| `floorPrice` | optional | Number | Minimum price in USD. Misuse of this parameter can impact revenue | 2.00
| `placementId` | optional | String | A unique placement identifier | "12345678"
| `testMode` | optional | Boolean | This activates the test mode | false
| `currency` | optional | String | 3 letters currency | "EUR"

# Test Parameters
```javascript
Expand Down
10 changes: 0 additions & 10 deletions test/spec/modules/minutemediaBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,6 @@ describe('minutemediaAdapter', function () {
expect(request.data.bids[1].mediaType).to.equal(BANNER)
});

it('should send the correct currency in bid request', function () {
const bid = utils.deepClone(bidRequests[0]);
bid.params = {
'currency': 'EUR'
};
const expectedCurrency = bid.params.currency;
const request = spec.buildRequests([bid], bidderRequest);
expect(request.data.bids[0].currency).to.equal(expectedCurrency);
});

it('should respect syncEnabled option', function() {
config.setConfig({
userSync: {
Expand Down

0 comments on commit 395bdf8

Please sign in to comment.