-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modify about currency #3
modify about currency #3
Conversation
const currencyType = config.getConfig('currency.adServerCurrency'); | ||
if (typeof currencyType === 'string' && ALLOWED_CURRENCIES.indexOf(currencyType) === -1) { | ||
utils.logError('Invalid currency type, we support only JPY and USD!'); | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to add a currency param instead of using the adserverCurrency as you do in your dsp adapter ?
adserverCurrencyの使用で、リクエストしている貨幣種類を返してくれるとのことなので、こちらを使用するように修正
(ref: https://github.com/prebid/Prebid.js/blob/master/modules/dsp_genieeBidAdapter.js#L74 )
@@ -84,16 +83,18 @@ describe('ssp_genieeBidAdapter', function () { | |||
}); | |||
|
|||
it('should return true when params.zoneId and params.currency exist and params.currency is JPY or USD', function () { | |||
config.setConfig({ currency: { adServerCurrency: 'JPY' } }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
リクエストする貨幣種類のセットのためにconfig.setConfigを使用する形に修正
]); | ||
expect(String(request[0].data.ib)).to.have.string('0'); | ||
expect(String(request[1].data.ib)).to.have.string(''); | ||
expect(String(request[1].data.ib)).to.have.string('0'); | ||
expect(String(request[2].data.ib)).to.have.string('0'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
検証忘れ
data.ibについては常に0を返す形にしていたので
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Type of change
Bugfix
Feature
New bidder adapter
Updated bidder adapter
Code style update (formatting, local variables)
Refactoring (no functional changes, no api changes)
Build related changes
CI related changes
Does this change affect user-facing APIs or examples documented on http://prebid.org?
Other
Description of change
To respond to the point of view from Prebid.js, I modify about
currency
inisBidRequestValid
fuction to useconfig.getConfig('currency.adServerCurrency')
Other information