-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
calling for currency file even when default rates are specified #3470
Conversation
…hen default rates are set
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 (verified with added unit test checks that currency file is requested even when default rates are set)
@@ -11,6 +11,7 @@ const CURRENCY_RATE_PRECISION = 4; | |||
var bidResponseQueue = []; | |||
var conversionCache = {}; | |||
var currencyRatesLoaded = false; | |||
var needToCallForCurrencyFile = true; |
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.
global state is a bad practice and should be refactored but I won't block the PR as it's already all over this module...
…id#3470) * calling for currency file even when default rates are specified * fixed broken unit tests * added unit test to check that currency file is still requested even when default rates are set
…id#3470) * calling for currency file even when default rates are specified * fixed broken unit tests * added unit test to check that currency file is still requested even when default rates are set
…id#3470) * calling for currency file even when default rates are specified * fixed broken unit tests * added unit test to check that currency file is still requested even when default rates are set
Type of change
Description of change
We introduced a bug with the last release of currency module -- when the
defaultRates
parameter is specified, no call is made to obtain the latest rates.With this config:
Expected results are that a call should go out to jsdelivr to pull the currency file.
Actual results: it doesn't currently with 1.37+.