1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

Order accounts on connect page (#8762)

This commit is contained in:
Erik Marks 2020-06-08 13:23:48 -07:00 committed by GitHub
parent 7af788138b
commit 53c55d8522
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,17 +177,17 @@ export function getAddressBookEntryName (state, address) {
export function accountsWithSendEtherInfoSelector (state) {
const accounts = getMetaMaskAccounts(state)
const { identities } = state.metamask
const identities = getMetaMaskIdentities(state)
const accountsWithSendEtherInfo = Object.entries(identities).map(([key, identity]) => {
return Object.assign({}, accounts[key], identity)
return Object.assign({}, identity, accounts[key])
})
return accountsWithSendEtherInfo
}
export function getAccountsWithLabels (state) {
return accountsWithSendEtherInfoSelector(state).map(({ address, name, balance }) => ({
return getMetaMaskAccountsOrdered(state).map(({ address, name, balance }) => ({
address,
addressLabel: `${name} (...${address.slice(address.length - 4)})`,
label: name,