mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge branch 'master' of https://github.com/AustP/metamask-plugin into AustP-master
This commit is contained in:
commit
41aad32b19
@ -123,7 +123,12 @@ function generateBalanceObject (formattedBalance, decimalsToKeep = 1) {
|
|||||||
var shortBalance = shortenBalance(balance, decimalsToKeep)
|
var shortBalance = shortenBalance(balance, decimalsToKeep)
|
||||||
|
|
||||||
if (beforeDecimal === '0' && afterDecimal.substr(0, 5) === '00000') {
|
if (beforeDecimal === '0' && afterDecimal.substr(0, 5) === '00000') {
|
||||||
balance = '<1.0e-5'
|
// eslint-disable-next-line eqeqeq
|
||||||
|
if (afterDecimal == 0) {
|
||||||
|
balance = '0'
|
||||||
|
} else {
|
||||||
|
balance = '<1.0e-5'
|
||||||
|
}
|
||||||
} else if (beforeDecimal !== '0') {
|
} else if (beforeDecimal !== '0') {
|
||||||
balance = `${beforeDecimal}.${afterDecimal.slice(0, decimalsToKeep)}`
|
balance = `${beforeDecimal}.${afterDecimal.slice(0, decimalsToKeep)}`
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user