aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/util.js
diff options
context:
space:
mode:
authorFrankie <frankie.pangilinan@consensys.net>2016-08-20 08:18:11 +0800
committerFrankie <frankie.pangilinan@consensys.net>2016-08-20 08:18:11 +0800
commitedfb0eb96803e4f01a8d4880b44ad220ce4bbb9a (patch)
treeb79cefa5d9bda8034fe3f7b7e053021528d27613 /ui/app/util.js
parent30af7e96cba7a88d46d3376097e4d44b715f834c (diff)
downloadtangerine-wallet-browser-edfb0eb96803e4f01a8d4880b44ad220ce4bbb9a.tar
tangerine-wallet-browser-edfb0eb96803e4f01a8d4880b44ad220ce4bbb9a.tar.gz
tangerine-wallet-browser-edfb0eb96803e4f01a8d4880b44ad220ce4bbb9a.tar.bz2
tangerine-wallet-browser-edfb0eb96803e4f01a8d4880b44ad220ce4bbb9a.tar.lz
tangerine-wallet-browser-edfb0eb96803e4f01a8d4880b44ad220ce4bbb9a.tar.xz
tangerine-wallet-browser-edfb0eb96803e4f01a8d4880b44ad220ce4bbb9a.tar.zst
tangerine-wallet-browser-edfb0eb96803e4f01a8d4880b44ad220ce4bbb9a.zip
Fix issue where if given a balance that does not need to be parsed will not be parsed
Diffstat (limited to 'ui/app/util.js')
-rw-r--r--ui/app/util.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/app/util.js b/ui/app/util.js
index 2d1c753dd..e4b77e2bc 100644
--- a/ui/app/util.js
+++ b/ui/app/util.js
@@ -92,8 +92,8 @@ function parseBalance (balance) {
// Takes wei hex, returns an object with three properties.
// Its "formatted" property is what we generally use to render values.
-function formatBalance (balance, decimalsToKeep) {
- var parsed = parseBalance(balance)
+function formatBalance (balance, decimalsToKeep, needsParse = true) {
+ var parsed = needsParse ? parseBalance(balance) : balance.split('.')
var beforeDecimal = parsed[0]
var afterDecimal = parsed[1]
var formatted = 'None'