aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2017-03-15 08:52:03 +0800
committerGitHub <noreply@github.com>2017-03-15 08:52:03 +0800
commita186e40d179d230fc1e81f7f507a5232d23ad462 (patch)
tree91d9cbb8baa26efa462a86e9ecda460792f90996 /ui/app
parentfcee7723e99c13b3fddcb97853dfdd771b42de14 (diff)
parent570cc891b5386dc04462737de4df6f2adf5059c9 (diff)
downloadtangerine-wallet-browser-a186e40d179d230fc1e81f7f507a5232d23ad462.tar
tangerine-wallet-browser-a186e40d179d230fc1e81f7f507a5232d23ad462.tar.gz
tangerine-wallet-browser-a186e40d179d230fc1e81f7f507a5232d23ad462.tar.bz2
tangerine-wallet-browser-a186e40d179d230fc1e81f7f507a5232d23ad462.tar.lz
tangerine-wallet-browser-a186e40d179d230fc1e81f7f507a5232d23ad462.tar.xz
tangerine-wallet-browser-a186e40d179d230fc1e81f7f507a5232d23ad462.tar.zst
tangerine-wallet-browser-a186e40d179d230fc1e81f7f507a5232d23ad462.zip
Merge branch 'master' into i1165-predictive
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/actions.js8
-rw-r--r--ui/app/components/fiat-value.js4
-rw-r--r--ui/app/config.js12
-rw-r--r--ui/app/reducers/metamask.js5
4 files changed, 13 insertions, 16 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 4e0435ade..b09021577 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -71,7 +71,7 @@ var actions = {
SHOW_CONF_TX_PAGE: 'SHOW_CONF_TX_PAGE',
SHOW_CONF_MSG_PAGE: 'SHOW_CONF_MSG_PAGE',
SET_CURRENT_FIAT: 'SET_CURRENT_FIAT',
- setCurrentFiat: setCurrentFiat,
+ setCurrentCurrency: setCurrentCurrency,
// account detail screen
SHOW_SEND_PAGE: 'SHOW_SEND_PAGE',
showSendPage: showSendPage,
@@ -330,10 +330,10 @@ function showInfoPage () {
}
}
-function setCurrentFiat (currencyCode) {
+function setCurrentCurrency (currencyCode) {
return (dispatch) => {
dispatch(this.showLoadingIndication())
- log.debug(`background.setCurrentFiat`)
+ log.debug(`background.setCurrentCurrency`)
background.setCurrentCurrency(currencyCode, (err, data) => {
dispatch(this.hideLoadingIndication())
if (err) {
@@ -343,7 +343,7 @@ function setCurrentFiat (currencyCode) {
dispatch({
type: this.SET_CURRENT_FIAT,
value: {
- currentFiat: data.currentFiat,
+ currentCurrency: data.currentCurrency,
conversionRate: data.conversionRate,
conversionDate: data.conversionDate,
},
diff --git a/ui/app/components/fiat-value.js b/ui/app/components/fiat-value.js
index 13ee48245..298809b30 100644
--- a/ui/app/components/fiat-value.js
+++ b/ui/app/components/fiat-value.js
@@ -9,7 +9,7 @@ module.exports = connect(mapStateToProps)(FiatValue)
function mapStateToProps (state) {
return {
conversionRate: state.metamask.conversionRate,
- currentFiat: state.metamask.currentFiat,
+ currentCurrency: state.metamask.currentCurrency,
}
}
@@ -34,7 +34,7 @@ FiatValue.prototype.render = function () {
fiatTooltipNumber = 'Unknown'
}
- var fiatSuffix = props.currentFiat
+ var fiatSuffix = props.currentCurrency
return fiatDisplay(fiatDisplayNumber, fiatSuffix)
}
diff --git a/ui/app/config.js b/ui/app/config.js
index 00a4cba88..3f0507f48 100644
--- a/ui/app/config.js
+++ b/ui/app/config.js
@@ -125,19 +125,19 @@ function rpcValidation (newRpc, state) {
}
function currentConversionInformation (metamaskState, state) {
- var currentFiat = metamaskState.currentFiat
+ var currentCurrency = metamaskState.currentCurrency
var conversionDate = metamaskState.conversionDate
return h('div', [
h('span', {style: { fontWeight: 'bold', paddingRight: '10px'}}, 'Current Conversion'),
h('span', {style: { fontWeight: 'bold', paddingRight: '10px', fontSize: '13px'}}, `Updated ${Date(conversionDate)}`),
- h('select#currentFiat', {
+ h('select#currentCurrency', {
onChange (event) {
event.preventDefault()
- var element = document.getElementById('currentFiat')
- var newFiat = element.value
- state.dispatch(actions.setCurrentFiat(newFiat))
+ var element = document.getElementById('currentCurrency')
+ var newCurrency = element.value
+ state.dispatch(actions.setCurrentCurrency(newCurrency))
},
- defaultValue: currentFiat,
+ defaultValue: currentCurrency,
}, currencies.map((currency) => {
return h('option', {key: currency.code, value: currency.code}, `${currency.code} - ${currency.name}`)
})
diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js
index 10d3b0461..2b5151466 100644
--- a/ui/app/reducers/metamask.js
+++ b/ui/app/reducers/metamask.js
@@ -13,9 +13,6 @@ function reduceMetamask (state, action) {
rpcTarget: 'https://rawtestrpc.metamask.io/',
identities: {},
unapprovedTxs: {},
- currentFiat: 'USD',
- conversionRate: 0,
- conversionDate: 'N/A',
noActiveNotices: true,
lastUnreadNotice: undefined,
frequentRpcList: [],
@@ -127,7 +124,7 @@ function reduceMetamask (state, action) {
case actions.SET_CURRENT_FIAT:
return extend(metamaskState, {
- currentFiat: action.value.currentFiat,
+ currentCurrency: action.value.currentCurrency,
conversionRate: action.value.conversionRate,
conversionDate: action.value.conversionDate,
})