mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
Merge branch 'AustP-master'
This commit is contained in:
commit
609bd7d6e8
@ -96,7 +96,7 @@ function formatBalance (balance, decimalsToKeep) {
|
||||
var parsed = parseBalance(balance)
|
||||
var beforeDecimal = parsed[0]
|
||||
var afterDecimal = parsed[1]
|
||||
var formatted = 'None'
|
||||
var formatted
|
||||
if (decimalsToKeep === undefined) {
|
||||
if (beforeDecimal === '0') {
|
||||
if (afterDecimal !== '0') {
|
||||
@ -123,7 +123,12 @@ function generateBalanceObject (formattedBalance, decimalsToKeep = 1) {
|
||||
var shortBalance = shortenBalance(balance, decimalsToKeep)
|
||||
|
||||
if (beforeDecimal === '0' && afterDecimal.substr(0, 5) === '00000') {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
if (afterDecimal == 0) {
|
||||
balance = '0'
|
||||
} else {
|
||||
balance = '<1.0e-5'
|
||||
}
|
||||
} else if (beforeDecimal !== '0') {
|
||||
balance = `${beforeDecimal}.${afterDecimal.slice(0, decimalsToKeep)}`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user