diff options
app - currency - fix typo + prefer log over console
Diffstat (limited to 'app/scripts')
-rw-r--r-- | app/scripts/controllers/currency.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/scripts/controllers/currency.js b/app/scripts/controllers/currency.js index 266d8ff1d..36b8808aa 100644 --- a/app/scripts/controllers/currency.js +++ b/app/scripts/controllers/currency.js @@ -44,14 +44,15 @@ class CurrencyController { } async updateConversionRate () { + let currentCurrency try { - const currentCurrency = this.getCurrentCurrency() + currentCurrency = this.getCurrentCurrency() const response = await fetch(`https://api.infura.io/v1/ticker/eth${currentCurrency.toLowerCase()}`) const parsedResponse = await response.json() this.setConversionRate(Number(parsedResponse.bid)) this.setConversionDate(Number(parsedResponse.timestamp)) } catch (err) { - console.warn(`MetaMask - Failed to query currency conversion:`, currentCurrency, err) + log.warn(`MetaMask - Failed to query currency conversion:`, currentCurrency, err) this.setConversionRate(0) this.setConversionDate('N/A') } |