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 From 456ceefcf7967423ea66e81d2108ffcb0e144082 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Thu, 14 Sep 2017 09:14:57 -0700 Subject: Modify conversion to new api. --- ui/app/config.js | 4 +- ui/app/infura-conversion.json | 651 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 597 insertions(+), 58 deletions(-) (limited to 'ui') diff --git a/ui/app/config.js b/ui/app/config.js index 8eaaa1384..cc74b29db 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 infuraCurrencies = require('./infura-conversion.json').symbols +const infuraCurrencies = require('./infura-conversion.json').objects const validUrl = require('valid-url') const exportAsFile = require('./util').exportAsFile @@ -168,7 +168,7 @@ function currentConversionInformation (metamaskState, state) { }, defaultValue: currentCurrency, }, infuraCurrencies.map((currency) => { - return h('option', {key: currency, value: currency}, currency) + return h('option', {key: currency.symbol, value: currency.symbol}, `${currency.quote.code.toUpperCase()} - ${currency.quote.name}`) }) ), ]) diff --git a/ui/app/infura-conversion.json b/ui/app/infura-conversion.json index de5ff4a90..3103e72a0 100644 --- a/ui/app/infura-conversion.json +++ b/ui/app/infura-conversion.json @@ -1,59 +1,598 @@ { - "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" + "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" + } + } ] } -- cgit From f6f7798828cd7f6325800b96d10a823a3338cdb0 Mon Sep 17 00:00:00 2001 From: Roman Rodov Date: Mon, 4 Sep 2017 11:09:50 +1000 Subject: Resolve merge conflicts for currency sort merge. --- ui/app/config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/config.js b/ui/app/config.js index cc74b29db..06a1c2899 100644 --- a/ui/app/config.js +++ b/ui/app/config.js @@ -167,7 +167,9 @@ function currentConversionInformation (metamaskState, state) { state.dispatch(actions.setCurrentCurrency(newCurrency)) }, defaultValue: currentCurrency, - }, infuraCurrencies.map((currency) => { + }, infuraCurrencies.sort((a, b) => { + return a.quote.name.toLocaleLowerCase().localeCompare(b.quote.name.toLocaleLowerCase()) + }).map((currency) => { return h('option', {key: currency.symbol, value: currency.symbol}, `${currency.quote.code.toUpperCase()} - ${currency.quote.name}`) }) ), -- cgit From 9af52ee1c58db23728d9240f3d5ec472a6adf68f Mon Sep 17 00:00:00 2001 From: Roman Rodov Date: Fri, 8 Sep 2017 10:56:43 +1000 Subject: Another merge conflict resolved. --- ui/app/config.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ui') diff --git a/ui/app/config.js b/ui/app/config.js index 06a1c2899..4b0218692 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 infuraCurrencies = require('./infura-conversion.json').objects +const infuraCurrencies = require('./infura-conversion.json').sort((a, b) => { + return a.name.toLocaleLowerCase().localeCompare(b.name.toLocaleLowerCase()) + }) const validUrl = require('valid-url') const exportAsFile = require('./util').exportAsFile @@ -167,9 +169,7 @@ function currentConversionInformation (metamaskState, state) { state.dispatch(actions.setCurrentCurrency(newCurrency)) }, defaultValue: currentCurrency, - }, infuraCurrencies.sort((a, b) => { - return a.quote.name.toLocaleLowerCase().localeCompare(b.quote.name.toLocaleLowerCase()) - }).map((currency) => { + }, infuraCurrencies.map((currency) => { return h('option', {key: currency.symbol, value: currency.symbol}, `${currency.quote.code.toUpperCase()} - ${currency.quote.name}`) }) ), -- cgit From 51cebcc1733e6ac2b1d7fa8841eb937c979cd074 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Mon, 18 Sep 2017 12:20:41 -0700 Subject: Fix the property query for new currencies. --- ui/app/config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/app/config.js b/ui/app/config.js index 4b0218692..fbd38c7f4 100644 --- a/ui/app/config.js +++ b/ui/app/config.js @@ -3,8 +3,8 @@ const Component = require('react').Component const h = require('react-hyperscript') const connect = require('react-redux').connect const actions = require('./actions') -const infuraCurrencies = require('./infura-conversion.json').sort((a, b) => { - return a.name.toLocaleLowerCase().localeCompare(b.name.toLocaleLowerCase()) +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 -- cgit From bd8428e9ed3e1fb386620def0739720aa8985299 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Mon, 18 Sep 2017 16:09:01 -0700 Subject: Comply with current currency API and add additional styling. --- ui/app/components/fiat-value.js | 2 +- ui/app/config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ui') 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}`) }) ), ]) -- cgit From 88ddedfb5a293cce4f2716729f412f633dff4053 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 26 Sep 2017 10:09:50 -0700 Subject: Account for undefined currencies. --- ui/app/components/fiat-value.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/components/fiat-value.js b/ui/app/components/fiat-value.js index d76b80ab2..d69f41d11 100644 --- a/ui/app/components/fiat-value.js +++ b/ui/app/components/fiat-value.js @@ -13,6 +13,7 @@ function FiatValue () { FiatValue.prototype.render = function () { const props = this.props const { conversionRate, currentCurrency } = props + const renderedCurrency = currentCurrency || '' const value = formatBalance(props.value, 6) @@ -28,7 +29,7 @@ FiatValue.prototype.render = function () { fiatTooltipNumber = 'Unknown' } - return fiatDisplay(fiatDisplayNumber, currentCurrency.toUpperCase()) + return fiatDisplay(fiatDisplayNumber, renderedCurrency.toUpperCase()) } function fiatDisplay (fiatDisplayNumber, fiatSuffix) { -- cgit From 7b199e215d9767cf059420df750670140d5bc958 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 26 Sep 2017 10:11:18 -0700 Subject: Polish names on currency list. --- ui/app/infura-conversion.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ui') diff --git a/ui/app/infura-conversion.json b/ui/app/infura-conversion.json index 3103e72a0..f4c6f9e34 100644 --- a/ui/app/infura-conversion.json +++ b/ui/app/infura-conversion.json @@ -85,7 +85,7 @@ }, "quote": { "code": "cad", - "name": "Canadian dollar" + "name": "Canadian Dollar" } }, { @@ -184,7 +184,7 @@ }, "quote": { "code": "gbp", - "name": "Pound sterling" + "name": "Pound Sterling" } }, { @@ -239,7 +239,7 @@ }, "quote": { "code": "jpy", - "name": "Japanese yen" + "name": "Japanese Yen" } }, { @@ -415,7 +415,7 @@ }, "quote": { "code": "rub", - "name": "Russian ruble" + "name": "Russian Ruble" } }, { @@ -514,7 +514,7 @@ }, "quote": { "code": "uah", - "name": "Ukrainian hryvnia" + "name": "Ukrainian Hryvnia" } }, { @@ -525,7 +525,7 @@ }, "quote": { "code": "usd", - "name": "United States dollar" + "name": "United States Dollar" } }, { @@ -558,7 +558,7 @@ }, "quote": { "code": "xlm", - "name": "Stellar lumen" + "name": "Stellar Lumen" } }, { -- cgit From accee142821884925f6fb8d7c84b5a0390feaf1c Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 26 Sep 2017 10:35:13 -0700 Subject: Remove old conversion list. --- ui/app/conversion.json | 207 ------------------------------------------------- 1 file changed, 207 deletions(-) delete mode 100644 ui/app/conversion.json (limited to 'ui') diff --git a/ui/app/conversion.json b/ui/app/conversion.json deleted file mode 100644 index 155ffc4fc..000000000 --- a/ui/app/conversion.json +++ /dev/null @@ -1,207 +0,0 @@ -{ - "rows": [ - { - "code": "REP", - "name": "Augur", - "statuses": [ - "primary" - ] - }, - { - "code": "BCN", - "name": "Bytecoin", - "statuses": [ - "primary" - ] - }, - { - "code": "BTC", - "name": "Bitcoin", - "statuses": [ - "primary", - "secondary" - ] - }, - { - "code": "BTS", - "name": "BitShares", - "statuses": [ - "primary", - "secondary" - ] - }, - { - "code": "BLK", - "name": "Blackcoin", - "statuses": [ - "primary" - ] - }, - { - "code": "GBP", - "name": "British Pound Sterling", - "statuses": [ - "secondary" - ] - }, - { - "code": "CAD", - "name": "Canadian Dollar", - "statuses": [ - "secondary" - ] - }, - { - "code": "CNY", - "name": "Chinese Yuan", - "statuses": [ - "secondary" - ] - }, - { - "code": "DSH", - "name": "Dashcoin", - "statuses": [ - "primary" - ] - }, - { - "code": "DOGE", - "name": "Dogecoin", - "statuses": [ - "primary", - "secondary" - ] - }, - { - "code": "ETC", - "name": "Ethereum Classic", - "statuses": [ - "primary" - ] - }, - { - "code": "EUR", - "name": "Euro", - "statuses": [ - "primary", - "secondary" - ] - }, - { - "code": "GNO", - "name": "GNO", - "statuses": [ - "primary" - ] - }, - { - "code": "GNT", - "name": "GNT", - "statuses": [ - "primary" - ] - }, - { - "code": "JPY", - "name": "Japanese Yen", - "statuses": [ - "secondary" - ] - }, - { - "code": "LTC", - "name": "Litecoin", - "statuses": [ - "primary", - "secondary" - ] - }, - { - "code": "MAID", - "name": "MaidSafeCoin", - "statuses": [ - "primary" - ] - }, - { - "code": "XEM", - "name": "NEM", - "statuses": [ - "primary" - ] - }, - { - "code": "XLM", - "name": "Stellar", - "statuses": [ - "primary" - ] - }, - { - "code": "XMR", - "name": "Monero", - "statuses": [ - "primary", - "secondary" - ] - }, - { - "code": "XRP", - "name": "Ripple", - "statuses": [ - "primary" - ] - }, - { - "code": "RUR", - "name": "Ruble", - "statuses": [ - "secondary" - ] - }, - { - "code": "STEEM", - "name": "Steem", - "statuses": [ - "primary" - ] - }, - { - "code": "STRAT", - "name": "STRAT", - "statuses": [ - "primary" - ] - }, - { - "code": "UAH", - "name": "Ukrainian Hryvnia", - "statuses": [ - "secondary" - ] - }, - { - "code": "USD", - "name": "US Dollar", - "statuses": [ - "primary", - "secondary" - ] - }, - { - "code": "WAVES", - "name": "WAVES", - "statuses": [ - "primary" - ] - }, - { - "code": "ZEC", - "name": "Zcash", - "statuses": [ - "primary" - ] - } - ] -} -- cgit From 734490c58c25587a247e48eea086880bcb6a14fe Mon Sep 17 00:00:00 2001 From: tmashuang Date: Wed, 27 Sep 2017 11:16:38 -0700 Subject: Add AUD, HKD, SGD, IDR, PHP to currency conversion list --- ui/app/infura-conversion.json | 55 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'ui') diff --git a/ui/app/infura-conversion.json b/ui/app/infura-conversion.json index f4c6f9e34..9a96fe069 100644 --- a/ui/app/infura-conversion.json +++ b/ui/app/infura-conversion.json @@ -1,5 +1,60 @@ { "objects": [ + { + "symbol": "ethaud", + "base": { + "code": "eth", + "name": "Ethereum" + }, + "quote": { + "code": "aud", + "name": "Australian Dollar" + } + }, + { + "symbol": "ethhkd", + "base": { + "code": "eth", + "name": "Ethereum" + }, + "quote": { + "code": "hkd", + "name": "Hong Kong Dollar" + } + }, + { + "symbol": "ethsgd", + "base": { + "code": "eth", + "name": "Ethereum" + }, + "quote": { + "code": "sgd", + "name": "Singapore Dollar" + } + }, + { + "symbol": "ethidr", + "base": { + "code": "eth", + "name": "Ethereum" + }, + "quote": { + "code": "idr", + "name": "Indonesian Rupiah" + } + }, + { + "symbol": "ethphp", + "base": { + "code": "eth", + "name": "Ethereum" + }, + "quote": { + "code": "php", + "name": "Philippine Peso" + } + }, { "symbol": "eth1st", "base": { -- cgit From d6ea2fa425c90f6e05d2d59d4a79f1b573cc2e06 Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 29 Sep 2017 16:35:58 -0700 Subject: network - convert localhost from custom rpc to network type --- ui/app/actions.js | 23 ++++++++--------------- ui/app/app.js | 2 +- 2 files changed, 9 insertions(+), 16 deletions(-) (limited to 'ui') diff --git a/ui/app/actions.js b/ui/app/actions.js index e793e6a21..4844dd56e 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -126,7 +126,6 @@ var actions = { showAddTokenPage, addToken, setRpcTarget: setRpcTarget, - setDefaultRpcTarget: setDefaultRpcTarget, setProviderType: setProviderType, // loading overlay SHOW_LOADING: 'SHOW_LOADING_INDICATION', @@ -706,16 +705,19 @@ function markAccountsFound () { // config // -// default rpc target refers to localhost:8545 in this instance. -function setDefaultRpcTarget () { - log.debug(`background.setDefaultRpcTarget`) +function setProviderType (type) { return (dispatch) => { - background.setDefaultRpc((err, result) => { + log.debug(`background.setProviderType`) + background.setProviderType(type, (err, result) => { if (err) { log.error(err) - return dispatch(self.displayWarning('Had a problem changing networks.')) + return dispatch(self.displayWarning('Had a problem changing networks!')) } }) + return { + type: actions.SET_PROVIDER_TYPE, + value: type, + } } } @@ -744,15 +746,6 @@ function addToAddressBook (recipient, nickname) { } } -function setProviderType (type) { - log.debug(`background.setProviderType`) - background.setProviderType(type) - return { - type: actions.SET_PROVIDER_TYPE, - value: type, - } -} - function useEtherscanProvider () { log.debug(`background.useEtherscanProvider`) background.useEtherscanProvider() diff --git a/ui/app/app.js b/ui/app/app.js index ee800ea90..50121b055 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -319,7 +319,7 @@ App.prototype.renderNetworkDropdown = function () { { key: 'default', closeMenu: () => this.setState({ isNetworkMenuOpen: !isOpen }), - onClick: () => props.dispatch(actions.setDefaultRpcTarget()), + onClick: () => props.dispatch(actions.setProviderType('localhost')), style: { fontSize: '18px', }, -- cgit From a2b6d3ffc56a3f7fdab6b5ef42426f0a65fda7c7 Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 29 Sep 2017 16:37:01 -0700 Subject: network - remove long dead etherscan provider code --- ui/app/actions.js | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'ui') diff --git a/ui/app/actions.js b/ui/app/actions.js index 4844dd56e..3ea092e57 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -119,8 +119,6 @@ var actions = { SET_RPC_TARGET: 'SET_RPC_TARGET', SET_DEFAULT_RPC_TARGET: 'SET_DEFAULT_RPC_TARGET', SET_PROVIDER_TYPE: 'SET_PROVIDER_TYPE', - USE_ETHERSCAN_PROVIDER: 'USE_ETHERSCAN_PROVIDER', - useEtherscanProvider: useEtherscanProvider, showConfigPage, SHOW_ADD_TOKEN_PAGE: 'SHOW_ADD_TOKEN_PAGE', showAddTokenPage, @@ -746,14 +744,6 @@ function addToAddressBook (recipient, nickname) { } } -function useEtherscanProvider () { - log.debug(`background.useEtherscanProvider`) - background.useEtherscanProvider() - return { - type: actions.USE_ETHERSCAN_PROVIDER, - } -} - function showLoadingIndication (message) { return { type: actions.SHOW_LOADING, -- cgit