aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/eth-balance.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-10-30 08:25:05 +0800
committerkumavis <aaron@kumavis.me>2018-10-30 08:25:05 +0800
commitccbc2332829569b6bb416ced624ee3123c54b939 (patch)
treeb865d8b499a00921b4b38f2839dfc6c631aa4666 /ui/app/components/eth-balance.js
parentf0602ca354a6d352c13a79a1cba884f54e5b9a83 (diff)
parent1bb4a8428c73c1f1137793b25900db159eec3fa8 (diff)
downloadtangerine-wallet-browser-ccbc2332829569b6bb416ced624ee3123c54b939.tar.gz
tangerine-wallet-browser-ccbc2332829569b6bb416ced624ee3123c54b939.tar.zst
tangerine-wallet-browser-ccbc2332829569b6bb416ced624ee3123c54b939.zip
Merge branch 'develop' of github.com:MetaMask/metamask-extension into sentry-enhancements2
Diffstat (limited to 'ui/app/components/eth-balance.js')
-rw-r--r--ui/app/components/eth-balance.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/ui/app/components/eth-balance.js b/ui/app/components/eth-balance.js
index c3d084bdc..2f6395a2d 100644
--- a/ui/app/components/eth-balance.js
+++ b/ui/app/components/eth-balance.js
@@ -1,5 +1,6 @@
const { Component } = require('react')
const h = require('react-hyperscript')
+const connect = require('react-redux').connect
const { inherits } = require('util')
const {
formatBalance,
@@ -8,7 +9,12 @@ const {
const Tooltip = require('./tooltip.js')
const FiatValue = require('./fiat-value.js')
-module.exports = EthBalanceComponent
+module.exports = connect(mapStateToProps)(EthBalanceComponent)
+function mapStateToProps (state) {
+ return {
+ ticker: state.metamask.ticker,
+ }
+}
inherits(EthBalanceComponent, Component)
function EthBalanceComponent () {
@@ -17,9 +23,9 @@ function EthBalanceComponent () {
EthBalanceComponent.prototype.render = function () {
const props = this.props
- const { value, style, width, needsParse = true } = props
+ const { ticker, value, style, width, needsParse = true } = props
- const formattedValue = value ? formatBalance(value, 6, needsParse) : '...'
+ const formattedValue = value ? formatBalance(value, 6, needsParse, ticker) : '...'
return (