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:
parent
66ed4dfaa3
commit
06292107d7
@ -86,9 +86,14 @@ function mapDispatchToProps (dispatch, ownProps) {
|
|||||||
hideSidebar: () => dispatch(actions.hideSidebar()),
|
hideSidebar: () => dispatch(actions.hideSidebar()),
|
||||||
showNetworkDropdown: () => dispatch(actions.showNetworkDropdown()),
|
showNetworkDropdown: () => dispatch(actions.showNetworkDropdown()),
|
||||||
hideNetworkDropdown: () => dispatch(actions.hideNetworkDropdown()),
|
hideNetworkDropdown: () => dispatch(actions.hideNetworkDropdown()),
|
||||||
|
setCurrentCurrencyToUSD: () => dispatch(actions.setCurrentCurrency('usd')),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
App.prototype.componentWillMount = function () {
|
||||||
|
this.props.setCurrentCurrencyToUSD()
|
||||||
|
}
|
||||||
|
|
||||||
App.prototype.render = function () {
|
App.prototype.render = function () {
|
||||||
var props = this.props
|
var props = this.props
|
||||||
const { isLoading, loadingMessage, network } = props
|
const { isLoading, loadingMessage, network } = props
|
||||||
|
@ -33,7 +33,6 @@ function mapStateToProps (state) {
|
|||||||
|
|
||||||
function mapDispatchToProps (dispatch) {
|
function mapDispatchToProps (dispatch) {
|
||||||
return {
|
return {
|
||||||
setCurrentCurrencyToUSD: () => dispatch(actions.setCurrentCurrency('USD')),
|
|
||||||
backToAccountDetail: address => dispatch(actions.backToAccountDetail(address)),
|
backToAccountDetail: address => dispatch(actions.backToAccountDetail(address)),
|
||||||
cancelTransaction: ({ id }) => dispatch(actions.cancelTx({ id })),
|
cancelTransaction: ({ id }) => dispatch(actions.cancelTx({ id })),
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,6 @@ function mapStateToProps (state) {
|
|||||||
|
|
||||||
function mapDispatchToProps (dispatch) {
|
function mapDispatchToProps (dispatch) {
|
||||||
return {
|
return {
|
||||||
setCurrentCurrencyToUSD: () => dispatch(actions.setCurrentCurrency('USD')),
|
|
||||||
backToAccountDetail: address => dispatch(actions.backToAccountDetail(address)),
|
backToAccountDetail: address => dispatch(actions.backToAccountDetail(address)),
|
||||||
cancelTransaction: ({ id }) => dispatch(actions.cancelTx({ id })),
|
cancelTransaction: ({ id }) => dispatch(actions.cancelTx({ id })),
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ function mapStateToProps (state) {
|
|||||||
|
|
||||||
function mapDispatchToProps (dispatch) {
|
function mapDispatchToProps (dispatch) {
|
||||||
return {
|
return {
|
||||||
setCurrentCurrencyToUSD: () => dispatch(actions.setCurrentCurrency('USD')),
|
setCurrentCurrencyToUSD: () => dispatch(actions.setCurrentCurrency('usd')),
|
||||||
backToAccountDetail: address => dispatch(actions.backToAccountDetail(address)),
|
backToAccountDetail: address => dispatch(actions.backToAccountDetail(address)),
|
||||||
cancelTransaction: ({ id }) => dispatch(actions.cancelTx({ id })),
|
cancelTransaction: ({ id }) => dispatch(actions.cancelTx({ id })),
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,8 @@ function TokenBalance () {
|
|||||||
|
|
||||||
TokenBalance.prototype.render = function () {
|
TokenBalance.prototype.render = function () {
|
||||||
const state = this.state
|
const state = this.state
|
||||||
const { symbol, string, balanceOnly, isLoading } = state
|
const { symbol, string, isLoading } = state
|
||||||
|
const { balanceOnly } = this.props
|
||||||
|
|
||||||
return isLoading
|
return isLoading
|
||||||
? h('span', '')
|
? h('span', '')
|
||||||
|
@ -177,3 +177,11 @@ $wallet-view-bg: $wild-sand;
|
|||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
margin: 5% 7% 0%;
|
margin: 5% 7% 0%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fiat-amount {
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token-balance__amount {
|
||||||
|
padding-right: 6px;
|
||||||
|
}
|
||||||
|
@ -370,6 +370,10 @@
|
|||||||
font-size: 40px;
|
font-size: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
margin-top: 13px;
|
margin-top: 13px;
|
||||||
|
|
||||||
|
.token-balance__amount {
|
||||||
|
padding-right: 12px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__button-group {
|
&__button-group {
|
||||||
|
@ -21,6 +21,7 @@ $wallet-balance-breakpoint-range: "screen and (min-width: #{$break-large}) and (
|
|||||||
&__fiat-amount {
|
&__fiat-amount {
|
||||||
margin-top: .25%;
|
margin-top: .25%;
|
||||||
font-size: 105%;
|
font-size: 105%;
|
||||||
|
text-transform: uppercase;
|
||||||
|
|
||||||
@media #{$wallet-balance-breakpoint-range} {
|
@media #{$wallet-balance-breakpoint-range} {
|
||||||
font-size: 95%;
|
font-size: 95%;
|
||||||
|
Loading…
Reference in New Issue
Block a user