diff --git a/ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js b/ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js index 38a8fda6e..9d8483648 100644 --- a/ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js +++ b/ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js @@ -11,7 +11,7 @@ import { } from '../../../../ducks/alerts/unconnected-account' import { getOriginOfCurrentTab, - getPermittedIdentitiesForCurrentTab, + getOrderedConnectedAccountsForActiveTab, getSelectedAddress, getSelectedIdentity, } from '../../../../selectors' @@ -32,7 +32,7 @@ const UnconnectedAccountAlert = () => { const t = useI18nContext() const dispatch = useDispatch() const alertState = useSelector(getAlertState) - const connectedAccounts = useSelector(getPermittedIdentitiesForCurrentTab) + const connectedAccounts = useSelector(getOrderedConnectedAccountsForActiveTab) const origin = useSelector(getOriginOfCurrentTab) const selectedIdentity = useSelector(getSelectedIdentity) const selectedAddress = useSelector(getSelectedAddress) diff --git a/ui/app/selectors/permissions.js b/ui/app/selectors/permissions.js index 2960a753f..8c294b762 100644 --- a/ui/app/selectors/permissions.js +++ b/ui/app/selectors/permissions.js @@ -1,5 +1,5 @@ import { forOwn } from 'lodash' -import { getMetaMaskAccountsOrdered, getMetaMaskIdentities, getOriginOfCurrentTab, getSelectedAddress } from '.' +import { getMetaMaskAccountsOrdered, getOriginOfCurrentTab, getSelectedAddress } from '.' import { CAVEAT_NAMES, } from '../../../app/scripts/controllers/permissions/enums' @@ -119,14 +119,6 @@ export function getConnectedDomainsForSelectedAddress (state) { return connectedDomains } -export function getPermittedIdentitiesForCurrentTab (state) { - const permittedAccounts = getPermittedAccountsForCurrentTab(state) - const identities = getMetaMaskIdentities(state) - return permittedAccounts - .map((address) => identities[address]) - .filter((identity) => Boolean(identity)) -} - /** * Returns an object mapping addresses to objects mapping origins to connected * domain info. Domain info objects have the following properties: