diff options
author | kumavis <kumavis@users.noreply.github.com> | 2017-09-28 07:26:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-28 07:26:44 +0800 |
commit | e451655c107a0c0cf8bc688a64cd48fba7e58c54 (patch) | |
tree | 448a321264f3d648d6edee7e90c6f487bc31084b /app/scripts | |
parent | ecf909e140b2fc99afbd15f6f0882dd17e3ecb88 (diff) | |
parent | 15b2823e546cfefd7e867f078b4385ddc6be3a0f (diff) | |
download | tangerine-wallet-browser-e451655c107a0c0cf8bc688a64cd48fba7e58c54.tar tangerine-wallet-browser-e451655c107a0c0cf8bc688a64cd48fba7e58c54.tar.gz tangerine-wallet-browser-e451655c107a0c0cf8bc688a64cd48fba7e58c54.tar.bz2 tangerine-wallet-browser-e451655c107a0c0cf8bc688a64cd48fba7e58c54.tar.lz tangerine-wallet-browser-e451655c107a0c0cf8bc688a64cd48fba7e58c54.tar.xz tangerine-wallet-browser-e451655c107a0c0cf8bc688a64cd48fba7e58c54.tar.zst tangerine-wallet-browser-e451655c107a0c0cf8bc688a64cd48fba7e58c54.zip |
Merge pull request #2177 from MetaMask/new-currency-test
Switching To Infura's Currency API
Diffstat (limited to 'app/scripts')
-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..9e696ce55 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: 'usd', 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/eth${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) { |