diff options
author | Kevin Serrano <kevin.serrano@consensys.net> | 2017-08-30 07:36:05 +0800 |
---|---|---|
committer | Kevin Serrano <kevin.serrano@consensys.net> | 2017-08-30 07:36:05 +0800 |
commit | 056276af02c5717684e36eeeaf6a8787ea4a39e6 (patch) | |
tree | e7acecefaa74e87925a7d186cb9325ddc80237c1 /app/scripts/controllers/currency.js | |
parent | 34b327caf07cd395229806cedecdeb770c034562 (diff) | |
download | tangerine-wallet-browser-056276af02c5717684e36eeeaf6a8787ea4a39e6.tar tangerine-wallet-browser-056276af02c5717684e36eeeaf6a8787ea4a39e6.tar.gz tangerine-wallet-browser-056276af02c5717684e36eeeaf6a8787ea4a39e6.tar.bz2 tangerine-wallet-browser-056276af02c5717684e36eeeaf6a8787ea4a39e6.tar.lz tangerine-wallet-browser-056276af02c5717684e36eeeaf6a8787ea4a39e6.tar.xz tangerine-wallet-browser-056276af02c5717684e36eeeaf6a8787ea4a39e6.tar.zst tangerine-wallet-browser-056276af02c5717684e36eeeaf6a8787ea4a39e6.zip |
integrate infura currency
Diffstat (limited to 'app/scripts/controllers/currency.js')
-rw-r--r-- | app/scripts/controllers/currency.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/scripts/controllers/currency.js b/app/scripts/controllers/currency.js index 1f20dc005..e32f51ec2 100644 --- a/app/scripts/controllers/currency.js +++ b/app/scripts/controllers/currency.js @@ -8,7 +8,7 @@ class CurrencyController { constructor (opts = {}) { const initState = extend({ - currentCurrency: 'USD', + currentCurrency: 'ethusd', conversionRate: 0, conversionDate: 'N/A', }, opts.initState) @@ -45,10 +45,10 @@ class CurrencyController { updateConversionRate () { const currentCurrency = this.getCurrentCurrency() - return fetch(`https://api.cryptonator.com/api/ticker/eth-${currentCurrency}`) + return fetch(`https://api.infura.io/v1/ticker/${currentCurrency}`) .then(response => response.json()) .then((parsedResponse) => { - this.setConversionRate(Number(parsedResponse.ticker.price)) + this.setConversionRate(Number(parsedResponse.bid)) this.setConversionDate(Number(parsedResponse.timestamp)) }).catch((err) => { if (err) { |