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:
parent
7af788138b
commit
53c55d8522
@ -177,17 +177,17 @@ export function getAddressBookEntryName (state, address) {
|
|||||||
|
|
||||||
export function accountsWithSendEtherInfoSelector (state) {
|
export function accountsWithSendEtherInfoSelector (state) {
|
||||||
const accounts = getMetaMaskAccounts(state)
|
const accounts = getMetaMaskAccounts(state)
|
||||||
const { identities } = state.metamask
|
const identities = getMetaMaskIdentities(state)
|
||||||
|
|
||||||
const accountsWithSendEtherInfo = Object.entries(identities).map(([key, identity]) => {
|
const accountsWithSendEtherInfo = Object.entries(identities).map(([key, identity]) => {
|
||||||
return Object.assign({}, accounts[key], identity)
|
return Object.assign({}, identity, accounts[key])
|
||||||
})
|
})
|
||||||
|
|
||||||
return accountsWithSendEtherInfo
|
return accountsWithSendEtherInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getAccountsWithLabels (state) {
|
export function getAccountsWithLabels (state) {
|
||||||
return accountsWithSendEtherInfoSelector(state).map(({ address, name, balance }) => ({
|
return getMetaMaskAccountsOrdered(state).map(({ address, name, balance }) => ({
|
||||||
address,
|
address,
|
||||||
addressLabel: `${name} (...${address.slice(address.length - 4)})`,
|
addressLabel: `${name} (...${address.slice(address.length - 4)})`,
|
||||||
label: name,
|
label: name,
|
||||||
|
Loading…
Reference in New Issue
Block a user