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 /ui/app/config.js | |
parent | ecf909e140b2fc99afbd15f6f0882dd17e3ecb88 (diff) | |
parent | 15b2823e546cfefd7e867f078b4385ddc6be3a0f (diff) | |
download | tangerine-wallet-browser-e451655c107a0c0cf8bc688a64cd48fba7e58c54.tar.gz 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 'ui/app/config.js')
-rw-r--r-- | ui/app/config.js | 8 |
1 files changed, 5 insertions, 3 deletions
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}`) }) ), ]) |