diff options
author | Chi Kei Chan <chikeichan@gmail.com> | 2017-09-29 07:13:53 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-09-29 07:13:53 +0800 |
commit | 06292107d756f0b25805f819cd276e4b6303ccb0 (patch) | |
tree | a336439564c418556436941dfa8220d30b13a35f /ui | |
parent | 66ed4dfaa31be826f0d5a4a34410e34eca34d007 (diff) | |
download | tangerine-wallet-browser-06292107d756f0b25805f819cd276e4b6303ccb0.tar tangerine-wallet-browser-06292107d756f0b25805f819cd276e4b6303ccb0.tar.gz tangerine-wallet-browser-06292107d756f0b25805f819cd276e4b6303ccb0.tar.bz2 tangerine-wallet-browser-06292107d756f0b25805f819cd276e4b6303ccb0.tar.lz tangerine-wallet-browser-06292107d756f0b25805f819cd276e4b6303ccb0.tar.xz tangerine-wallet-browser-06292107d756f0b25805f819cd276e4b6303ccb0.tar.zst tangerine-wallet-browser-06292107d756f0b25805f819cd276e4b6303ccb0.zip |
Always set currency to USD on app mount
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/app.js | 5 | ||||
-rw-r--r-- | ui/app/components/pending-tx/confirm-deploy-contract.js | 1 | ||||
-rw-r--r-- | ui/app/components/pending-tx/confirm-send-ether.js | 1 | ||||
-rw-r--r-- | ui/app/components/pending-tx/index.js | 2 | ||||
-rw-r--r-- | ui/app/components/token-balance.js | 3 | ||||
-rw-r--r-- | ui/app/css/itcss/components/newui-sections.scss | 8 | ||||
-rw-r--r-- | ui/app/css/itcss/components/send.scss | 4 | ||||
-rw-r--r-- | ui/app/css/itcss/components/token-list.scss | 1 |
8 files changed, 21 insertions, 4 deletions
diff --git a/ui/app/app.js b/ui/app/app.js index 14e6a26e2..7468551eb 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -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 diff --git a/ui/app/components/pending-tx/confirm-deploy-contract.js b/ui/app/components/pending-tx/confirm-deploy-contract.js index 89a0389d7..386e14afe 100644 --- a/ui/app/components/pending-tx/confirm-deploy-contract.js +++ b/ui/app/components/pending-tx/confirm-deploy-contract.js @@ -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 })), } diff --git a/ui/app/components/pending-tx/confirm-send-ether.js b/ui/app/components/pending-tx/confirm-send-ether.js index b03ec0552..330a55cce 100644 --- a/ui/app/components/pending-tx/confirm-send-ether.js +++ b/ui/app/components/pending-tx/confirm-send-ether.js @@ -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 })), } diff --git a/ui/app/components/pending-tx/index.js b/ui/app/components/pending-tx/index.js index b7dd50ff1..770fb1dfd 100644 --- a/ui/app/components/pending-tx/index.js +++ b/ui/app/components/pending-tx/index.js @@ -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 })), } diff --git a/ui/app/components/token-balance.js b/ui/app/components/token-balance.js index 0342c1da9..2f71c0687 100644 --- a/ui/app/components/token-balance.js +++ b/ui/app/components/token-balance.js @@ -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', '') diff --git a/ui/app/css/itcss/components/newui-sections.scss b/ui/app/css/itcss/components/newui-sections.scss index ae6ee6311..5ce4f281c 100644 --- a/ui/app/css/itcss/components/newui-sections.scss +++ b/ui/app/css/itcss/components/newui-sections.scss @@ -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; +} diff --git a/ui/app/css/itcss/components/send.scss b/ui/app/css/itcss/components/send.scss index 03e0fac1d..dee8157ef 100644 --- a/ui/app/css/itcss/components/send.scss +++ b/ui/app/css/itcss/components/send.scss @@ -370,6 +370,10 @@ font-size: 40px; line-height: 40px; margin-top: 13px; + + .token-balance__amount { + padding-right: 12px; + } } &__button-group { diff --git a/ui/app/css/itcss/components/token-list.scss b/ui/app/css/itcss/components/token-list.scss index 9a772f666..e4d6d975b 100644 --- a/ui/app/css/itcss/components/token-list.scss +++ b/ui/app/css/itcss/components/token-list.scss @@ -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%; |