diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-08-05 05:04:04 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-08-05 05:04:04 +0800 |
commit | 92fb827923d5b162e2418aaa4e90646244722cc6 (patch) | |
tree | 08cb282a77f87f12f028ef8380cb3971e37134d7 /ui/app/config.js | |
parent | 479abadaa7dc59dc900cb35e897e0f164e3bb345 (diff) | |
download | tangerine-wallet-browser-92fb827923d5b162e2418aaa4e90646244722cc6.tar tangerine-wallet-browser-92fb827923d5b162e2418aaa4e90646244722cc6.tar.gz tangerine-wallet-browser-92fb827923d5b162e2418aaa4e90646244722cc6.tar.bz2 tangerine-wallet-browser-92fb827923d5b162e2418aaa4e90646244722cc6.tar.lz tangerine-wallet-browser-92fb827923d5b162e2418aaa4e90646244722cc6.tar.xz tangerine-wallet-browser-92fb827923d5b162e2418aaa4e90646244722cc6.tar.zst tangerine-wallet-browser-92fb827923d5b162e2418aaa4e90646244722cc6.zip |
currency now selectable and save-able.
Diffstat (limited to 'ui/app/config.js')
-rw-r--r-- | ui/app/config.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ui/app/config.js b/ui/app/config.js index c88e7ac6e..5fac358b6 100644 --- a/ui/app/config.js +++ b/ui/app/config.js @@ -3,6 +3,7 @@ const Component = require('react').Component const h = require('react-hyperscript') const connect = require('react-redux').connect const actions = require('./actions') +const select = require('react-select') module.exports = connect(mapStateToProps)(ConfigScreen) @@ -74,6 +75,8 @@ ConfigScreen.prototype.render = function () { }, 'Save'), ]), h('hr.horizontal-line'), + currentConversionInformation(metamaskState, state), + h('hr.horizontal-line'), h('div', { style: { @@ -97,6 +100,28 @@ ConfigScreen.prototype.render = function () { ) } +function currentConversionInformation (metamaskState, state) { + var currentFiat = metamaskState.currentFiat + return h('div'), [ + h('span', {style: { fontWeight: 'bold', paddingRight: '10px'}}, "Current Fiat"), + h('select#currentFiat', { + onChange (event) { + event.preventDefault() + var element = document.getElementById("currentFiat") + var newFiat = element.value + state.dispatch(actions.setCurrentFiat(newFiat)) + }, + value: currentFiat, + defaultValue: currentFiat, + }, [ + h('option', {key: 'usd', value: 'usd'}, 'usd'), + h('option', {key: 'eur', value: 'eur'}, 'eur'), + h('option', {key: 'jpy', value: 'jpy'}, 'jpy'), + ] + ), + ] +} + function currentProviderDisplay (metamaskState) { var provider = metamaskState.provider var title, value |