aboutsummaryrefslogtreecommitdiffstats
path: root/old-ui/app/components/eth-balance.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-11-02 09:29:45 +0800
committerGitHub <noreply@github.com>2018-11-02 09:29:45 +0800
commit337a4e1b4ea7a560d773bc262b2adffd1617a39b (patch)
treef3c2f9b33642ef9be901645645734129686e6c6e /old-ui/app/components/eth-balance.js
parentc2f97717c0fbf9a64cf527891f7a1f35049fb023 (diff)
parentde231c7a6191ca869308b6d27ca9cd4b020e59aa (diff)
downloadtangerine-wallet-browser-337a4e1b4ea7a560d773bc262b2adffd1617a39b.tar.gz
tangerine-wallet-browser-337a4e1b4ea7a560d773bc262b2adffd1617a39b.tar.zst
tangerine-wallet-browser-337a4e1b4ea7a560d773bc262b2adffd1617a39b.zip
Merge pull request #5649 from MetaMask/develop
Version 4.17.0
Diffstat (limited to 'old-ui/app/components/eth-balance.js')
-rw-r--r--old-ui/app/components/eth-balance.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/old-ui/app/components/eth-balance.js b/old-ui/app/components/eth-balance.js
index 4f538fd31..4458e6a9a 100644
--- a/old-ui/app/components/eth-balance.js
+++ b/old-ui/app/components/eth-balance.js
@@ -1,12 +1,18 @@
const Component = require('react').Component
const h = require('react-hyperscript')
+const connect = require('react-redux').connect
const inherits = require('util').inherits
const formatBalance = require('../util').formatBalance
const generateBalanceObject = require('../util').generateBalanceObject
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 () {
@@ -16,9 +22,9 @@ function EthBalanceComponent () {
EthBalanceComponent.prototype.render = function () {
var props = this.props
let { value } = props
- const { style, width } = props
+ const { ticker, style, width } = props
var needsParse = this.props.needsParse !== undefined ? this.props.needsParse : true
- value = value ? formatBalance(value, 6, needsParse) : '...'
+ value = value ? formatBalance(value, 6, needsParse, ticker) : '...'
return (