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

Fix order of account list (#12999)

This commit is contained in:
filipsekulic 2021-12-10 17:46:24 +01:00 committed by GitHub
parent 889e49a4a2
commit bdc7e1df57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -1,8 +1,8 @@
import { connect } from 'react-redux';
import {
accountsWithSendEtherInfoSelector,
getAddressBook,
getAddressBookEntry,
getMetaMaskAccountsOrdered,
} from '../../../../selectors';
import {
@ -34,9 +34,7 @@ function mapStateToProps(state) {
const addressBook = getAddressBook(state);
const ownedAccounts = accountsWithSendEtherInfoSelector(state).sort((a, b) =>
a.name.localeCompare(b.name),
);
const ownedAccounts = getMetaMaskAccountsOrdered(state);
return {
addressBook,

View File

@ -12,7 +12,7 @@ jest.mock('react-redux', () => ({
jest.mock('../../../../selectors', () => ({
getAddressBook: (s) => [{ name: `mockAddressBook:${s}` }],
getAddressBookEntry: (s) => `mockAddressBookEntry:${s}`,
accountsWithSendEtherInfoSelector: () => [
getMetaMaskAccountsOrdered: () => [
{ name: `account1:mockState` },
{ name: `account2:mockState` },
],