|
|
@ -3,6 +3,7 @@ const Component = require('react').Component |
|
|
|
const h = require('react-hyperscript') |
|
|
|
const h = require('react-hyperscript') |
|
|
|
const connect = require('react-redux').connect |
|
|
|
const connect = require('react-redux').connect |
|
|
|
const actions = require('./actions') |
|
|
|
const actions = require('./actions') |
|
|
|
|
|
|
|
const currencies = require('./conversion-util').availableCurrencies.rows |
|
|
|
const Select = require('react-select') |
|
|
|
const Select = require('react-select') |
|
|
|
|
|
|
|
|
|
|
|
module.exports = connect(mapStateToProps)(ConfigScreen) |
|
|
|
module.exports = connect(mapStateToProps)(ConfigScreen) |
|
|
@ -103,7 +104,7 @@ ConfigScreen.prototype.render = function () { |
|
|
|
function currentConversionInformation (metamaskState, state) { |
|
|
|
function currentConversionInformation (metamaskState, state) { |
|
|
|
var currentFiat = metamaskState.currentFiat |
|
|
|
var currentFiat = metamaskState.currentFiat |
|
|
|
return h('div'), [ |
|
|
|
return h('div'), [ |
|
|
|
h('span', {style: { fontWeight: 'bold', paddingRight: '10px'}}, "Current Fiat"), |
|
|
|
h('span', {style: { fontWeight: 'bold', paddingRight: '10px'}}, 'Current Conversion'), |
|
|
|
h('select#currentFiat', { |
|
|
|
h('select#currentFiat', { |
|
|
|
onChange (event) { |
|
|
|
onChange (event) { |
|
|
|
event.preventDefault() |
|
|
|
event.preventDefault() |
|
|
@ -113,11 +114,14 @@ function currentConversionInformation (metamaskState, state) { |
|
|
|
}, |
|
|
|
}, |
|
|
|
value: currentFiat, |
|
|
|
value: currentFiat, |
|
|
|
defaultValue: currentFiat, |
|
|
|
defaultValue: currentFiat, |
|
|
|
}, [ |
|
|
|
}, currencies.map((currency) => { |
|
|
|
h('option', {key: 'USD', value: 'USD'}, 'USD'), |
|
|
|
return h('option', {key: currency.code, value: currency.code}, `${currency.code} - ${currency.name}`) |
|
|
|
h('option', {key: 'EUR', value: 'EUR'}, 'EUR'), |
|
|
|
}) |
|
|
|
h('option', {key: 'JPY', value: 'JPY'}, 'JPY'), |
|
|
|
// [
|
|
|
|
] |
|
|
|
// h('option', {key: 'USD', value: 'USD'}, 'USD'),
|
|
|
|
|
|
|
|
// h('option', {key: 'EUR', value: 'EUR'}, 'EUR'),
|
|
|
|
|
|
|
|
// h('option', {key: 'JPY', value: 'JPY'}, 'JPY'),
|
|
|
|
|
|
|
|
// ]
|
|
|
|
), |
|
|
|
), |
|
|
|
] |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|