diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 45305ee8f..1550f0937 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -21,7 +21,7 @@ module.exports = class MetamaskController { this.idStore.setStore(this.ethStore) this.messageManager = messageManager this.publicConfigStore = this.initPublicConfigStore - this.configManager.setCurrentFiat('usd') + this.configManager.setCurrentFiat('USD') this.configManager.updateConversionRate() this.scheduleConversionInterval() } diff --git a/ui/app/actions.js b/ui/app/actions.js index 2fd1ccc1c..14cbeac42 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -216,9 +216,13 @@ function revealAccount () { } } + + function setCurrentFiat (fiat) { return (dispatch) => { + dispatch(this.showLoadingIndication()) _accountManager.setCurrentFiat(fiat, (data, err) => { + dispatch(this.hideLoadingIndication()) dispatch({ type: this.SET_CURRENT_FIAT, value: { diff --git a/ui/app/components/eth-balance.js b/ui/app/components/eth-balance.js index 4ecb436ee..1a7f75db9 100644 --- a/ui/app/components/eth-balance.js +++ b/ui/app/components/eth-balance.js @@ -6,6 +6,7 @@ const formatBalance = require('../util').formatBalance const generateBalanceObject = require('../util').generateBalanceObject const Tooltip = require('./tooltip.js') +module.exports = connect(mapStateToProps)(EthBalanceComponent) function mapStateToProps (state) { return { @@ -15,9 +16,6 @@ function mapStateToProps (state) { } } -module.exports = connect(mapStateToProps)(EthBalanceComponent) - - inherits(EthBalanceComponent, Component) function EthBalanceComponent () { Component.call(this)