From 056276af02c5717684e36eeeaf6a8787ea4a39e6 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 29 Aug 2017 16:36:05 -0700 Subject: integrate infura currency --- ui/app/config.js | 6 ++--- ui/app/infura-conversion.json | 59 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 ui/app/infura-conversion.json (limited to 'ui') diff --git a/ui/app/config.js b/ui/app/config.js index 62785c49b..c6d9c3e5d 100644 --- a/ui/app/config.js +++ b/ui/app/config.js @@ -3,7 +3,7 @@ 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').symbols const validUrl = require('valid-url') const copyToClipboard = require('copy-to-clipboard') @@ -166,8 +166,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, value: currency}, currency) }) ), ]) diff --git a/ui/app/infura-conversion.json b/ui/app/infura-conversion.json new file mode 100644 index 000000000..de5ff4a90 --- /dev/null +++ b/ui/app/infura-conversion.json @@ -0,0 +1,59 @@ +{ + "symbols": [ + "eth1st", + "ethadt", + "ethadx", + "ethant", + "ethbat", + "ethbnt", + "ethbtc", + "ethcad", + "ethcfi", + "ethcrb", + "ethcvc", + "ethdash", + "ethdgd", + "ethetc", + "etheur", + "ethfun", + "ethgbp", + "ethgno", + "ethgnt", + "ethgup", + "ethhmq", + "ethjpy", + "ethlgd", + "ethlsk", + "ethltc", + "ethlun", + "ethmco", + "ethmtl", + "ethmyst", + "ethnmr", + "ethomg", + "ethpay", + "ethptoy", + "ethqrl", + "ethqtum", + "ethrep", + "ethrlc", + "ethrub", + "ethsc", + "ethsngls", + "ethsnt", + "ethsteem", + "ethstorj", + "ethtime", + "ethtkn", + "ethtrst", + "ethuah", + "ethusd", + "ethwings", + "ethxbt", + "ethxem", + "ethxlm", + "ethxmr", + "ethxrp", + "ethzec" + ] +} -- cgit