diff options
author | Thomas Huang <tmashuang@users.noreply.github.com> | 2018-05-01 05:37:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-01 05:37:22 +0800 |
commit | 3180b69b974f8ffc0d6546a647725d1bf8539483 (patch) | |
tree | f66de97601e859214c3d59eee45c38b337393342 /app/scripts/controllers | |
parent | 099fc0917dd5d281b60e2879bd1f555fe0988981 (diff) | |
parent | 477063a5a0e9f218af2a49886c44a9bc153c13d3 (diff) | |
download | tangerine-wallet-browser-3180b69b974f8ffc0d6546a647725d1bf8539483.tar tangerine-wallet-browser-3180b69b974f8ffc0d6546a647725d1bf8539483.tar.gz tangerine-wallet-browser-3180b69b974f8ffc0d6546a647725d1bf8539483.tar.bz2 tangerine-wallet-browser-3180b69b974f8ffc0d6546a647725d1bf8539483.tar.lz tangerine-wallet-browser-3180b69b974f8ffc0d6546a647725d1bf8539483.tar.xz tangerine-wallet-browser-3180b69b974f8ffc0d6546a647725d1bf8539483.tar.zst tangerine-wallet-browser-3180b69b974f8ffc0d6546a647725d1bf8539483.zip |
Merge pull request #4140 from MetaMask/v4.6.1
Version 4.6.1
Diffstat (limited to 'app/scripts/controllers')
-rw-r--r-- | app/scripts/controllers/token-rates.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/scripts/controllers/token-rates.js b/app/scripts/controllers/token-rates.js index abeec4cc0..87d716aa6 100644 --- a/app/scripts/controllers/token-rates.js +++ b/app/scripts/controllers/token-rates.js @@ -1,4 +1,5 @@ const ObservableStore = require('obs-store') +const { warn } = require('loglevel') // By default, poll every 3 minutes const DEFAULT_INTERVAL = 180 * 1000 @@ -42,7 +43,10 @@ class TokenRatesController { const response = await fetch(`https://metamask.balanc3.net/prices?from=${address}&to=ETH&autoConversion=false&summaryOnly=true`) const json = await response.json() return json && json.length ? json[0].averagePrice : 0 - } catch (error) { } + } catch (error) { + warn(`MetaMask - TokenRatesController exchange rate fetch failed for ${address}.`, error) + return 0 + } } /** |