aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-04-04 01:39:23 +0800
committerkumavis <aaron@kumavis.me>2018-04-04 01:39:23 +0800
commit038ad914541c3a4e6579da5b1ac79ba41b33cfb3 (patch)
tree54c55a8223ce9d90783b02902e60ea4fb9ba4136 /app/scripts
parent79d63332eeb798346f5cd4af6fc4ff91372ab014 (diff)
downloadtangerine-wallet-browser-038ad914541c3a4e6579da5b1ac79ba41b33cfb3.tar
tangerine-wallet-browser-038ad914541c3a4e6579da5b1ac79ba41b33cfb3.tar.gz
tangerine-wallet-browser-038ad914541c3a4e6579da5b1ac79ba41b33cfb3.tar.bz2
tangerine-wallet-browser-038ad914541c3a4e6579da5b1ac79ba41b33cfb3.tar.lz
tangerine-wallet-browser-038ad914541c3a4e6579da5b1ac79ba41b33cfb3.tar.xz
tangerine-wallet-browser-038ad914541c3a4e6579da5b1ac79ba41b33cfb3.tar.zst
tangerine-wallet-browser-038ad914541c3a4e6579da5b1ac79ba41b33cfb3.zip
app - currency - fix typo + prefer log over console
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/controllers/currency.js5
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')
}