mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix rendering of loose accounts
This commit is contained in:
parent
f6748f043d
commit
c05e04c611
@ -50,7 +50,7 @@ AccountListItem.prototype.render = function () {
|
||||
},
|
||||
}, ethUtil.toChecksumAddress(identity.address)),
|
||||
h(EthBalance, {
|
||||
value: account.balance,
|
||||
value: account && account.balance,
|
||||
style: {
|
||||
lineHeight: '7px',
|
||||
marginTop: '10px',
|
||||
@ -76,7 +76,7 @@ AccountListItem.prototype.indicateIfLoose = function () {
|
||||
try { // Sometimes keyrings aren't loaded yet:
|
||||
const type = this.props.keyring.type
|
||||
const isLoose = type !== 'HD Key Tree'
|
||||
return isLoose ? h('.pending-dot', 'LOOSE') : null
|
||||
return isLoose ? h('.keyring-label', 'LOOSE') : null
|
||||
} catch (e) { return }
|
||||
}
|
||||
|
||||
|
@ -15,9 +15,10 @@ function EthBalanceComponent () {
|
||||
|
||||
EthBalanceComponent.prototype.render = function () {
|
||||
var props = this.props
|
||||
let { value } = props
|
||||
var style = props.style
|
||||
var needsParse = this.props.needsParse !== undefined ? this.props.needsParse : true
|
||||
const value = formatBalance(props.value, 6, needsParse)
|
||||
value = value ? formatBalance(value, 6, needsParse) : '...'
|
||||
var width = props.width
|
||||
|
||||
return (
|
||||
@ -38,6 +39,7 @@ EthBalanceComponent.prototype.render = function () {
|
||||
EthBalanceComponent.prototype.renderBalance = function (value) {
|
||||
var props = this.props
|
||||
if (value === 'None') return value
|
||||
if (value === '...') return value
|
||||
var balanceObj = generateBalanceObject(value, props.shorten ? 1 : 3)
|
||||
var balance
|
||||
var splitBalance = value.split(' ')
|
||||
|
Loading…
Reference in New Issue
Block a user