mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
Render the accounts in keyring order
This commit is contained in:
parent
8b449b325d
commit
d9d09f953b
@ -135,11 +135,12 @@ AccountMenu.prototype.renderAccounts = function () {
|
||||
showAccountDetail,
|
||||
} = this.props
|
||||
|
||||
return Object.keys(identities).map((key, index) => {
|
||||
const identity = identities[key]
|
||||
const accountOrder = keyrings.reduce((list, keyring) => list.concat(keyring.accounts), [])
|
||||
return accountOrder.map((address) => {
|
||||
const identity = identities[address]
|
||||
const isSelected = identity.address === selectedAddress
|
||||
|
||||
const balanceValue = accounts[key] ? accounts[key].balance : ''
|
||||
const balanceValue = accounts[address] ? accounts[address].balance : ''
|
||||
const formattedBalance = balanceValue ? formatBalance(balanceValue, 6) : '...'
|
||||
const simpleAddress = identity.address.substring(2).toLowerCase()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user