app - currency - fix typo + prefer log over console

feature/default_network_editable
kumavis 7 years ago
parent 79d63332ee
commit 038ad91454
  1. 5
      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')
}

Loading…
Cancel
Save