Fix order of account list (#12999)

feature/default_network_editable
filipsekulic 3 years ago committed by GitHub
parent 889e49a4a2
commit bdc7e1df57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      ui/pages/send/send-content/add-recipient/add-recipient.container.js
  2. 2
      ui/pages/send/send-content/add-recipient/add-recipient.container.test.js

@ -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,

@ -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` },
],

Loading…
Cancel
Save