diff options
author | Kevin Serrano <kevin.serrano@consensys.net> | 2017-09-19 07:09:01 +0800 |
---|---|---|
committer | Kevin Serrano <kevin.serrano@consensys.net> | 2017-09-19 07:09:01 +0800 |
commit | bd8428e9ed3e1fb386620def0739720aa8985299 (patch) | |
tree | d2aefb2c29754360b53c346dfd9e7f98b6a86435 | |
parent | 51cebcc1733e6ac2b1d7fa8841eb937c979cd074 (diff) | |
download | tangerine-wallet-browser-bd8428e9ed3e1fb386620def0739720aa8985299.tar tangerine-wallet-browser-bd8428e9ed3e1fb386620def0739720aa8985299.tar.gz tangerine-wallet-browser-bd8428e9ed3e1fb386620def0739720aa8985299.tar.bz2 tangerine-wallet-browser-bd8428e9ed3e1fb386620def0739720aa8985299.tar.lz tangerine-wallet-browser-bd8428e9ed3e1fb386620def0739720aa8985299.tar.xz tangerine-wallet-browser-bd8428e9ed3e1fb386620def0739720aa8985299.tar.zst tangerine-wallet-browser-bd8428e9ed3e1fb386620def0739720aa8985299.zip |
Comply with current currency API and add additional styling.
-rw-r--r-- | app/scripts/controllers/currency.js | 4 | ||||
-rw-r--r-- | ui/app/components/fiat-value.js | 2 | ||||
-rw-r--r-- | ui/app/config.js | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/scripts/controllers/currency.js b/app/scripts/controllers/currency.js index e32f51ec2..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: 'ethusd', + currentCurrency: 'usd', conversionRate: 0, conversionDate: 'N/A', }, opts.initState) @@ -45,7 +45,7 @@ class CurrencyController { updateConversionRate () { const currentCurrency = this.getCurrentCurrency() - return fetch(`https://api.infura.io/v1/ticker/${currentCurrency}`) + return fetch(`https://api.infura.io/v1/ticker/eth${currentCurrency}`) .then(response => response.json()) .then((parsedResponse) => { this.setConversionRate(Number(parsedResponse.bid)) diff --git a/ui/app/components/fiat-value.js b/ui/app/components/fiat-value.js index 8a64a1cfc..d76b80ab2 100644 --- a/ui/app/components/fiat-value.js +++ b/ui/app/components/fiat-value.js @@ -28,7 +28,7 @@ FiatValue.prototype.render = function () { fiatTooltipNumber = 'Unknown' } - return fiatDisplay(fiatDisplayNumber, currentCurrency) + return fiatDisplay(fiatDisplayNumber, currentCurrency.toUpperCase()) } function fiatDisplay (fiatDisplayNumber, fiatSuffix) { diff --git a/ui/app/config.js b/ui/app/config.js index fbd38c7f4..0fe232c07 100644 --- a/ui/app/config.js +++ b/ui/app/config.js @@ -170,7 +170,7 @@ function currentConversionInformation (metamaskState, state) { }, defaultValue: currentCurrency, }, infuraCurrencies.map((currency) => { - return h('option', {key: currency.symbol, value: currency.symbol}, `${currency.quote.code.toUpperCase()} - ${currency.quote.name}`) + return h('option', {key: currency.quote.code, value: currency.quote.code}, `${currency.quote.code.toUpperCase()} - ${currency.quote.name}`) }) ), ]) |