aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md4
-rw-r--r--app/scripts/controllers/currency.js6
-rw-r--r--ui/app/components/fiat-value.js2
-rw-r--r--ui/app/config.js8
-rw-r--r--ui/app/infura-conversion.json598
5 files changed, 610 insertions, 8 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e692c58dc..8ece1cf75 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,7 +20,8 @@ rollback to 3.10.0 due to bug
- Fixed a long standing memory leak associated with filters installed by dapps
- Fix link to support center.
- Fixed tooltip icon locations to avoid overflow.
-- Warn users when a dapp proposes a high gas limit (90% of blockGasLimit or higher)
+- Warn users when a dapp proposes a high gas limit (90% of blockGasLimit or higher
+- Sort currencies by currency name (thanks to strelok1: https://github.com/strelok1).
## 3.10.0 2017-9-11
@@ -30,6 +31,7 @@ rollback to 3.10.0 due to bug
- Add validation preventing users from inputting their own addresses as token tracking addresses.
- Added button to reject all transactions (thanks to davidp94! https://github.com/davidp94)
+
## 3.9.13 2017-9-8
- Changed the way we initialize the inpage provider to fix a bug affecting some developers.
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) {
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 d64088ccb..0fe232c07 100644
--- a/ui/app/config.js
+++ b/ui/app/config.js
@@ -3,7 +3,9 @@ const Component = require('react').Component
const h = require('react-hyperscript')
const connect = require('react-redux').connect
const actions = require('./actions')
-const currencies = require('./conversion.json').rows
+const infuraCurrencies = require('./infura-conversion.json').objects.sort((a, b) => {
+ return a.quote.name.toLocaleLowerCase().localeCompare(b.quote.name.toLocaleLowerCase())
+ })
const validUrl = require('valid-url')
const exportAsFile = require('./util').exportAsFile
@@ -167,8 +169,8 @@ function currentConversionInformation (metamaskState, state) {
state.dispatch(actions.setCurrentCurrency(newCurrency))
},
defaultValue: currentCurrency,
- }, currencies.map((currency) => {
- return h('option', {key: currency.code, value: currency.code}, `${currency.code} - ${currency.name}`)
+ }, infuraCurrencies.map((currency) => {
+ return h('option', {key: currency.quote.code, value: currency.quote.code}, `${currency.quote.code.toUpperCase()} - ${currency.quote.name}`)
})
),
])
diff --git a/ui/app/infura-conversion.json b/ui/app/infura-conversion.json
new file mode 100644
index 000000000..3103e72a0
--- /dev/null
+++ b/ui/app/infura-conversion.json
@@ -0,0 +1,598 @@
+{
+ "objects": [
+ {
+ "symbol": "eth1st",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "1st",
+ "name": "FirstBlood"
+ }
+ },
+ {
+ "symbol": "ethadt",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "adt",
+ "name": "adToken"
+ }
+ },
+ {
+ "symbol": "ethadx",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "adx",
+ "name": "AdEx"
+ }
+ },
+ {
+ "symbol": "ethant",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "ant",
+ "name": "Aragon"
+ }
+ },
+ {
+ "symbol": "ethbat",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "bat",
+ "name": "Basic Attention Token"
+ }
+ },
+ {
+ "symbol": "ethbnt",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "bnt",
+ "name": "Bancor"
+ }
+ },
+ {
+ "symbol": "ethbtc",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "btc",
+ "name": "Bitcoin"
+ }
+ },
+ {
+ "symbol": "ethcad",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "cad",
+ "name": "Canadian dollar"
+ }
+ },
+ {
+ "symbol": "ethcfi",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "cfi",
+ "name": "Cofound.it"
+ }
+ },
+ {
+ "symbol": "ethcrb",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "crb",
+ "name": "CreditBit"
+ }
+ },
+ {
+ "symbol": "ethcvc",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "cvc",
+ "name": "Civic"
+ }
+ },
+ {
+ "symbol": "ethdash",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "dash",
+ "name": "Dash"
+ }
+ },
+ {
+ "symbol": "ethdgd",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "dgd",
+ "name": "DigixDAO"
+ }
+ },
+ {
+ "symbol": "ethetc",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "etc",
+ "name": "Ethereum Classic"
+ }
+ },
+ {
+ "symbol": "etheur",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "eur",
+ "name": "Euro"
+ }
+ },
+ {
+ "symbol": "ethfun",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "fun",
+ "name": "FunFair"
+ }
+ },
+ {
+ "symbol": "ethgbp",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "gbp",
+ "name": "Pound sterling"
+ }
+ },
+ {
+ "symbol": "ethgno",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "gno",
+ "name": "Gnosis"
+ }
+ },
+ {
+ "symbol": "ethgnt",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "gnt",
+ "name": "Golem"
+ }
+ },
+ {
+ "symbol": "ethgup",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "gup",
+ "name": "Matchpool"
+ }
+ },
+ {
+ "symbol": "ethhmq",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "hmq",
+ "name": "Humaniq"
+ }
+ },
+ {
+ "symbol": "ethjpy",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "jpy",
+ "name": "Japanese yen"
+ }
+ },
+ {
+ "symbol": "ethlgd",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "lgd",
+ "name": "Legends Room"
+ }
+ },
+ {
+ "symbol": "ethlsk",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "lsk",
+ "name": "Lisk"
+ }
+ },
+ {
+ "symbol": "ethltc",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "ltc",
+ "name": "Litecoin"
+ }
+ },
+ {
+ "symbol": "ethlun",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "lun",
+ "name": "Lunyr"
+ }
+ },
+ {
+ "symbol": "ethmco",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "mco",
+ "name": "Monaco"
+ }
+ },
+ {
+ "symbol": "ethmtl",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "mtl",
+ "name": "Metal"
+ }
+ },
+ {
+ "symbol": "ethmyst",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "myst",
+ "name": "Mysterium"
+ }
+ },
+ {
+ "symbol": "ethnmr",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "nmr",
+ "name": "Numeraire"
+ }
+ },
+ {
+ "symbol": "ethomg",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "omg",
+ "name": "OmiseGO"
+ }
+ },
+ {
+ "symbol": "ethpay",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "pay",
+ "name": "TenX"
+ }
+ },
+ {
+ "symbol": "ethptoy",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "ptoy",
+ "name": "Patientory"
+ }
+ },
+ {
+ "symbol": "ethqrl",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "qrl",
+ "name": "Quantum-Resistant Ledger"
+ }
+ },
+ {
+ "symbol": "ethqtum",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "qtum",
+ "name": "Qtum"
+ }
+ },
+ {
+ "symbol": "ethrep",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "rep",
+ "name": "Augur"
+ }
+ },
+ {
+ "symbol": "ethrlc",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "rlc",
+ "name": "iEx.ec"
+ }
+ },
+ {
+ "symbol": "ethrub",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "rub",
+ "name": "Russian ruble"
+ }
+ },
+ {
+ "symbol": "ethsc",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "sc",
+ "name": "Siacoin"
+ }
+ },
+ {
+ "symbol": "ethsngls",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "sngls",
+ "name": "SingularDTV"
+ }
+ },
+ {
+ "symbol": "ethsnt",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "snt",
+ "name": "Status"
+ }
+ },
+ {
+ "symbol": "ethsteem",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "steem",
+ "name": "Steem"
+ }
+ },
+ {
+ "symbol": "ethstorj",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "storj",
+ "name": "Storj"
+ }
+ },
+ {
+ "symbol": "ethtime",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "time",
+ "name": "ChronoBank"
+ }
+ },
+ {
+ "symbol": "ethtkn",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "tkn",
+ "name": "TokenCard"
+ }
+ },
+ {
+ "symbol": "ethtrst",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "trst",
+ "name": "WeTrust"
+ }
+ },
+ {
+ "symbol": "ethuah",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "uah",
+ "name": "Ukrainian hryvnia"
+ }
+ },
+ {
+ "symbol": "ethusd",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "usd",
+ "name": "United States dollar"
+ }
+ },
+ {
+ "symbol": "ethwings",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "wings",
+ "name": "Wings"
+ }
+ },
+ {
+ "symbol": "ethxem",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "xem",
+ "name": "NEM"
+ }
+ },
+ {
+ "symbol": "ethxlm",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "xlm",
+ "name": "Stellar lumen"
+ }
+ },
+ {
+ "symbol": "ethxmr",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "xmr",
+ "name": "Monero"
+ }
+ },
+ {
+ "symbol": "ethxrp",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "xrp",
+ "name": "Ripple"
+ }
+ },
+ {
+ "symbol": "ethzec",
+ "base": {
+ "code": "eth",
+ "name": "Ethereum"
+ },
+ "quote": {
+ "code": "zec",
+ "name": "Zcash"
+ }
+ }
+ ]
+}