diff options
author | Zac Mitton <zacmitton22@gmail.com> | 2016-05-26 09:29:03 +0800 |
---|---|---|
committer | Zac Mitton <zacmitton22@gmail.com> | 2016-05-26 09:29:03 +0800 |
commit | 2ce9f1a776ea3168438fa2bdfcac90b35492e8ac (patch) | |
tree | aed56176ef6d1c06b8a841efc105fa191b1bbb10 /ui/app/components | |
parent | b2b7e7ff7e57a5ce300f9fcc0b5a621004f01ced (diff) | |
download | tangerine-wallet-browser-2ce9f1a776ea3168438fa2bdfcac90b35492e8ac.tar tangerine-wallet-browser-2ce9f1a776ea3168438fa2bdfcac90b35492e8ac.tar.gz tangerine-wallet-browser-2ce9f1a776ea3168438fa2bdfcac90b35492e8ac.tar.bz2 tangerine-wallet-browser-2ce9f1a776ea3168438fa2bdfcac90b35492e8ac.tar.lz tangerine-wallet-browser-2ce9f1a776ea3168438fa2bdfcac90b35492e8ac.tar.xz tangerine-wallet-browser-2ce9f1a776ea3168438fa2bdfcac90b35492e8ac.tar.zst tangerine-wallet-browser-2ce9f1a776ea3168438fa2bdfcac90b35492e8ac.zip |
correctly displaying small balances with tests
Diffstat (limited to 'ui/app/components')
-rw-r--r-- | ui/app/components/eth-balance.js | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/ui/app/components/eth-balance.js b/ui/app/components/eth-balance.js index 3f88ef2d4..76b75d4c8 100644 --- a/ui/app/components/eth-balance.js +++ b/ui/app/components/eth-balance.js @@ -2,6 +2,7 @@ const Component = require('react').Component const h = require('react-hyperscript') const inherits = require('util').inherits const parseBalance = require('../util').parseBalance +const formatBalance = require('../util').formatBalance module.exports = EthBalanceComponent @@ -12,11 +13,8 @@ function EthBalanceComponent() { EthBalanceComponent.prototype.render = function() { var state = this.props - var parsedAmount = parseBalance(state.value) - var beforeDecimal = parsedAmount[0] - var afterDecimal = parsedAmount[1] - var value = beforeDecimal+(afterDecimal ? '.'+afterDecimal : '') var style = state.style + var value = formatBalance(state.value) return ( @@ -28,12 +26,6 @@ EthBalanceComponent.prototype.render = function() { display: 'inline', }, }, value), - h('.ether-balance-label', { - style: { - display: 'inline', - marginLeft: 6, - }, - }, 'ETH'), ]) ) |