1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Always set currency to USD on app mount

This commit is contained in:
Chi Kei Chan 2017-09-28 16:13:53 -07:00
parent 66ed4dfaa3
commit 06292107d7
8 changed files with 21 additions and 4 deletions

View File

@ -86,9 +86,14 @@ function mapDispatchToProps (dispatch, ownProps) {
hideSidebar: () => dispatch(actions.hideSidebar()),
showNetworkDropdown: () => dispatch(actions.showNetworkDropdown()),
hideNetworkDropdown: () => dispatch(actions.hideNetworkDropdown()),
setCurrentCurrencyToUSD: () => dispatch(actions.setCurrentCurrency('usd')),
}
}
App.prototype.componentWillMount = function () {
this.props.setCurrentCurrencyToUSD()
}
App.prototype.render = function () {
var props = this.props
const { isLoading, loadingMessage, network } = props

View File

@ -33,7 +33,6 @@ function mapStateToProps (state) {
function mapDispatchToProps (dispatch) {
return {
setCurrentCurrencyToUSD: () => dispatch(actions.setCurrentCurrency('USD')),
backToAccountDetail: address => dispatch(actions.backToAccountDetail(address)),
cancelTransaction: ({ id }) => dispatch(actions.cancelTx({ id })),
}

View File

@ -32,7 +32,6 @@ function mapStateToProps (state) {
function mapDispatchToProps (dispatch) {
return {
setCurrentCurrencyToUSD: () => dispatch(actions.setCurrentCurrency('USD')),
backToAccountDetail: address => dispatch(actions.backToAccountDetail(address)),
cancelTransaction: ({ id }) => dispatch(actions.cancelTx({ id })),
}

View File

@ -36,7 +36,7 @@ function mapStateToProps (state) {
function mapDispatchToProps (dispatch) {
return {
setCurrentCurrencyToUSD: () => dispatch(actions.setCurrentCurrency('USD')),
setCurrentCurrencyToUSD: () => dispatch(actions.setCurrentCurrency('usd')),
backToAccountDetail: address => dispatch(actions.backToAccountDetail(address)),
cancelTransaction: ({ id }) => dispatch(actions.cancelTx({ id })),
}

View File

@ -27,7 +27,8 @@ function TokenBalance () {
TokenBalance.prototype.render = function () {
const state = this.state
const { symbol, string, balanceOnly, isLoading } = state
const { symbol, string, isLoading } = state
const { balanceOnly } = this.props
return isLoading
? h('span', '')

View File

@ -177,3 +177,11 @@ $wallet-view-bg: $wild-sand;
justify-content: flex-start;
margin: 5% 7% 0%;
}
.fiat-amount {
text-transform: uppercase;
}
.token-balance__amount {
padding-right: 6px;
}

View File

@ -370,6 +370,10 @@
font-size: 40px;
line-height: 40px;
margin-top: 13px;
.token-balance__amount {
padding-right: 12px;
}
}
&__button-group {

View File

@ -21,6 +21,7 @@ $wallet-balance-breakpoint-range: "screen and (min-width: #{$break-large}) and (
&__fiat-amount {
margin-top: .25%;
font-size: 105%;
text-transform: uppercase;
@media #{$wallet-balance-breakpoint-range} {
font-size: 95%;