mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 17:33:23 +01:00
lint
This commit is contained in:
parent
20bfb60fd2
commit
40d2b7fe71
@ -26,12 +26,12 @@ EthBalanceComponent.prototype.render = function () {
|
|||||||
display: 'inline',
|
display: 'inline',
|
||||||
maxWidth: maxWidth,
|
maxWidth: maxWidth,
|
||||||
},
|
},
|
||||||
}, this.renderBalance(value,state)),
|
}, this.renderBalance(value, state)),
|
||||||
])
|
])
|
||||||
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
EthBalanceComponent.prototype.renderBalance = function (value,state) {
|
EthBalanceComponent.prototype.renderBalance = function (value, state) {
|
||||||
if (value === 'None') return value
|
if (value === 'None') return value
|
||||||
var balanceObj = generateBalanceObject(value)
|
var balanceObj = generateBalanceObject(value)
|
||||||
|
|
||||||
@ -72,14 +72,14 @@ EthBalanceComponent.prototype.renderBalance = function (value,state) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function shortenBalance(balance) {
|
function shortenBalance (balance) {
|
||||||
var truncatedValue
|
var truncatedValue
|
||||||
var convertedBalance = parseFloat(balance)
|
var convertedBalance = parseFloat(balance)
|
||||||
if (convertedBalance > 1000000) {
|
if (convertedBalance > 1000000) {
|
||||||
truncatedValue = (balance/1000000).toFixed(1)
|
truncatedValue = (balance / 1000000).toFixed(1)
|
||||||
return `${truncatedValue}m`
|
return `${truncatedValue}m`
|
||||||
} else if (convertedBalance > 1000) {
|
} else if (convertedBalance > 1000) {
|
||||||
truncatedValue = (balance/1000).toFixed(1)
|
truncatedValue = (balance / 1000).toFixed(1)
|
||||||
return `${truncatedValue}k`
|
return `${truncatedValue}k`
|
||||||
} else {
|
} else {
|
||||||
return balance
|
return balance
|
||||||
|
Loading…
Reference in New Issue
Block a user