Always set currency to USD on app mount

feature/default_network_editable
Chi Kei Chan 7 years ago
parent 66ed4dfaa3
commit 06292107d7
  1. 5
      ui/app/app.js
  2. 1
      ui/app/components/pending-tx/confirm-deploy-contract.js
  3. 1
      ui/app/components/pending-tx/confirm-send-ether.js
  4. 2
      ui/app/components/pending-tx/index.js
  5. 3
      ui/app/components/token-balance.js
  6. 8
      ui/app/css/itcss/components/newui-sections.scss
  7. 4
      ui/app/css/itcss/components/send.scss
  8. 1
      ui/app/css/itcss/components/token-list.scss

@ -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

@ -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 })),
}

@ -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 })),
}

@ -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 })),
}

@ -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', '')

@ -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;
}

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

@ -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%;

Loading…
Cancel
Save