diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json
index 13c657646160..d84bbfcfe7ed 100644
--- a/app/_locales/en/messages.json
+++ b/app/_locales/en/messages.json
@@ -162,6 +162,10 @@
"accountOptions": {
"message": "Account options"
},
+ "accountPermissionToast": {
+ "message": "Account permissions updated for $1",
+ "description": "$1 represents connected dapp"
+ },
"accountSelectionRequired": {
"message": "You need to select an account!"
},
@@ -174,6 +178,9 @@
"accountsConnected": {
"message": "Accounts connected"
},
+ "accountsPermissionsTitle": {
+ "message": "See your accounts and suggest transactions"
+ },
"active": {
"message": "Active"
},
@@ -641,9 +648,6 @@
"message": "Approved on $1 for $2",
"description": "$1 is the approval date for a permission. $2 is the AvatarGroup component displaying account images."
},
- "permittedChainToastUpdate": {
- "message": "$1 has been given access to $2."
- },
"areYouSure": {
"message": "Are you sure?"
},
@@ -1820,9 +1824,6 @@
"encryptionPublicKeyRequest": {
"message": "Request encryption public key"
},
- "accountsPermissionsTitle": {
- "message": "See your accounts and suggest transactions"
- },
"endpointReturnedDifferentChainId": {
"message": "The RPC URL you have entered returned a different chain ID ($1). Please update the Chain ID to match the RPC URL of the network you are trying to add.",
"description": "$1 is the return value of eth_chainId from an RPC endpoint"
@@ -3088,6 +3089,10 @@
"networkOptions": {
"message": "Network options"
},
+ "networkPermissionToast": {
+ "message": "Network permissions updated for $1",
+ "description": "$1 represents connected dapp"
+ },
"networkProvider": {
"message": "Network provider"
},
@@ -4039,6 +4044,9 @@
"permitSimulationDetailInfo": {
"message": "You're giving the spender permission to spend this many tokens from your account."
},
+ "permittedChainToastUpdate": {
+ "message": "$1 has been given access to $2."
+ },
"personalAddressDetected": {
"message": "Personal address detected. Input the token contract address."
},
diff --git a/test/data/mock-send-state.json b/test/data/mock-send-state.json
index 7dbf0967f4eb..1f8e6988e293 100644
--- a/test/data/mock-send-state.json
+++ b/test/data/mock-send-state.json
@@ -12,8 +12,6 @@
"appState": {
"networkDropdownOpen": false,
"importNftsModal": { "open": false },
- "showEditAccountsModalOpen": false,
- "showEditNetworksModalOpen": false,
"showPermittedNetworkToastOpen": false,
"gasIsLoading": false,
"isLoading": false,
diff --git a/test/data/mock-state.json b/test/data/mock-state.json
index f5e40d0b2495..b755b9bed3d5 100644
--- a/test/data/mock-state.json
+++ b/test/data/mock-state.json
@@ -14,8 +14,6 @@
"importNftsModal": {
"open": false
},
- "showEditAccountsModalOpen": false,
- "showEditNetworksModalOpen": false,
"showPermittedNetworkToastOpen": false,
"gasIsLoading": false,
"isLoading": false,
diff --git a/ui/components/multichain/app-header/app-header-unlocked-content.tsx b/ui/components/multichain/app-header/app-header-unlocked-content.tsx
index 03e73b6e757d..b62c52e06696 100644
--- a/ui/components/multichain/app-header/app-header-unlocked-content.tsx
+++ b/ui/components/multichain/app-header/app-header-unlocked-content.tsx
@@ -51,7 +51,7 @@ import { MetaMetricsContext } from '../../../contexts/metametrics';
import { useCopyToClipboard } from '../../../hooks/useCopyToClipboard';
import { MINUTE } from '../../../../shared/constants/time';
import { NotificationsTagCounter } from '../notifications-tag-counter';
-import { CONNECTIONS } from '../../../helpers/constants/routes';
+import { CONNECTIONS, REVIEW_PERMISSIONS } from '../../../helpers/constants/routes';
import { MultichainNetwork } from '../../../selectors/multichain';
type AppHeaderUnlockedContentProps = {
@@ -115,6 +115,9 @@ export const AppHeaderUnlockedContent = ({
};
const handleConnectionsRoute = () => {
+ if (process.env.CHAIN_PERMISSIONS) {
+ history.push(`${REVIEW_PERMISSIONS}/${encodeURIComponent(origin)}`);
+ }
history.push(`${CONNECTIONS}/${encodeURIComponent(origin)}`);
};
diff --git a/ui/components/multichain/global-menu/global-menu.js b/ui/components/multichain/global-menu/global-menu.js
index 46a1347f7cfb..5c51f057940f 100644
--- a/ui/components/multichain/global-menu/global-menu.js
+++ b/ui/components/multichain/global-menu/global-menu.js
@@ -252,25 +252,6 @@ export const GlobalMenu = ({ closeMenu, anchorElement, isOpen }) => {
>
{t('allPermissions')}
-
-
{
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
mmiPortfolioEnabled && (
diff --git a/ui/components/multichain/network-list-menu/network-list-menu.js b/ui/components/multichain/network-list-menu/network-list-menu.js
index 7e8b10e99ce8..f89655a5a713 100644
--- a/ui/components/multichain/network-list-menu/network-list-menu.js
+++ b/ui/components/multichain/network-list-menu/network-list-menu.js
@@ -176,7 +176,7 @@ export const NetworkListMenu = ({ onClose }) => {
return sortedNonTestNetworks;
};
- //check if not granted chain is clicked, then show the toast and grant permission
+ // check if not granted chain is clicked, then show the toast and grant permission
const networksList = newOrderNetworks();
const [items, setItems] = useState([...networksList]);
@@ -310,9 +310,11 @@ export const NetworkListMenu = ({ onClose }) => {
onClick={() => {
dispatch(toggleNetworkMenu());
dispatch(setActiveNetwork(network.providerType || network.id));
- grantPermittedChain(selectedTabOrigin, network.chainId);
- if (!flattenedPermittedChains.includes(network.chainId)) {
- dispatch(showPermittedNetworkToast());
+ if (process.env.CHAIN_PERMISSIONS) {
+ grantPermittedChain(selectedTabOrigin, network.chainId);
+ if (!flattenedPermittedChains.includes(network.chainId)) {
+ dispatch(showPermittedNetworkToast());
+ }
}
if (
useRequestQueue &&
diff --git a/ui/components/multichain/pages/permissions-page/permissions-page.js b/ui/components/multichain/pages/permissions-page/permissions-page.js
index a9b6e8467969..1089f3181a31 100644
--- a/ui/components/multichain/pages/permissions-page/permissions-page.js
+++ b/ui/components/multichain/pages/permissions-page/permissions-page.js
@@ -25,6 +25,7 @@ import {
import {
CONNECTIONS,
DEFAULT_ROUTE,
+ REVIEW_PERMISSIONS,
} from '../../../../helpers/constants/routes';
import {
getOnboardedInThisUISession,
@@ -53,6 +54,9 @@ export const PermissionsPage = () => {
const handleConnectionClick = (connection) => {
const hostName = connection.origin;
const safeEncodedHost = encodeURIComponent(hostName);
+ if (process.env.CHAIN_PERMISSIONS) {
+ history.push(`${REVIEW_PERMISSIONS}/${safeEncodedHost}`);
+ }
history.push(`${CONNECTIONS}/${safeEncodedHost}`);
};
diff --git a/ui/components/multichain/pages/review-permissions-page/review-permissions-page.tsx b/ui/components/multichain/pages/review-permissions-page/review-permissions-page.tsx
index 2dbad37a4c1f..966fe4cd6fd3 100644
--- a/ui/components/multichain/pages/review-permissions-page/review-permissions-page.tsx
+++ b/ui/components/multichain/pages/review-permissions-page/review-permissions-page.tsx
@@ -4,7 +4,9 @@ import { useHistory, useParams } from 'react-router-dom';
import {
AlignItems,
BackgroundColor,
+ BlockSize,
Display,
+ FlexDirection,
IconColor,
JustifyContent,
TextAlign,
@@ -21,7 +23,7 @@ import {
getPermissionSubjects,
getPermittedChainsByOrigin,
getPermittedChainsForSelectedTab,
-} from '../../../../selectors/index';
+} from '../../../../selectors';
import { removePermissionsFor } from '../../../../store/actions';
import {
AvatarFavicon,
@@ -37,9 +39,10 @@ import {
IconSize,
Text,
} from '../../../component-library';
+import { ToastContainer, Toast } from '../..';
import { NoConnectionContent } from '../connections/components/no-connection';
import { Content, Footer, Header, Page } from '../page';
-import { SiteCell } from './index';
+import { SiteCell } from '.';
export const ReviewPermissions = () => {
const t = useI18nContext();
@@ -47,7 +50,8 @@ export const ReviewPermissions = () => {
const history = useHistory();
const urlParams: { origin: string } = useParams();
const securedOrigin = decodeURIComponent(urlParams.origin);
-
+ const [showAccountToast, setShowAccountToast] = useState(false);
+ const [showNetworkToast, setShowNetworkToast] = useState(false);
const activeTabOrigin: string = securedOrigin;
const subjectMetadata = useSelector(getConnectedSitesList);
const connectedSubjectsMetadata = subjectMetadata[activeTabOrigin];
@@ -62,6 +66,7 @@ export const ReviewPermissions = () => {
const grantedNetworks = networksList.filter(
(net: { chainId: any }) => connectedNetworks.indexOf(net.chainId) !== -1,
);
+ const hostName = getURLHost(securedOrigin);
const disconnectAllAccounts = () => {
const subject = (subjects as SubjectsType)[activeTabOrigin];
@@ -81,8 +86,6 @@ export const ReviewPermissions = () => {
),
);
}
-
- console.log('all disconnected');
}
};
return (
@@ -90,65 +93,111 @@ export const ReviewPermissions = () => {
data-testid="connections-page"
className="main-container connections-page"
>
- {connectedAccounts.length > 0 ? <>
- (history as any).goBack()}
- />
- }
- >
-
- {connectedSubjectsMetadata?.iconUrl ? (
-
- ) : (
-
- )}
- 0 ? (
+ <>
+ (history as any).goBack()}
+ />
+ }
>
- {getURLHost(securedOrigin)}
-
-
-
-
-
-
- > :
-}
+
+ {connectedSubjectsMetadata?.iconUrl ? (
+
+ ) : (
+
+ )}
+
+ {hostName}
+
+
+
+
+ setShowAccountToast(true)}
+ onNetworksClick={() => setShowNetworkToast(true)}
+ />
+
+ {' '}
+ >
+ ) : (
+
+ )}
);
};
diff --git a/ui/components/multichain/pages/review-permissions-page/site-cell/site-cell-menu.tsx b/ui/components/multichain/pages/review-permissions-page/site-cell/site-cell-menu.tsx
index 8f0fa843c691..a8a94af75951 100644
--- a/ui/components/multichain/pages/review-permissions-page/site-cell/site-cell-menu.tsx
+++ b/ui/components/multichain/pages/review-permissions-page/site-cell/site-cell-menu.tsx
@@ -96,18 +96,16 @@ export const SiteCellMenu = ({
>
- {
- setShowPermissionModal(true);
- onClose();
- }}
- >
-
- {t('permissionDetails')}
-
-
+ {
+ setShowPermissionModal(true);
+ onClose();
+ }}
+ >
+ {t('permissionDetails')}
+
diff --git a/ui/components/multichain/pages/review-permissions-page/site-cell/site-cell.tsx b/ui/components/multichain/pages/review-permissions-page/site-cell/site-cell.tsx
index 4aeb5a72b5f3..676b87fa52b2 100644
--- a/ui/components/multichain/pages/review-permissions-page/site-cell/site-cell.tsx
+++ b/ui/components/multichain/pages/review-permissions-page/site-cell/site-cell.tsx
@@ -1,6 +1,7 @@
-import React from 'react';
+import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { SubjectType } from '@metamask/permission-controller';
+import { useDispatch } from 'react-redux';
import {
AlignItems,
BackgroundColor,
@@ -29,15 +30,15 @@ import {
} from '../../../../component-library';
import { getURLHost } from '../../../../../helpers/utils/util';
import { ConnectionListTooltip } from '../../permissions-page/connection-list-tooltip/connection-list-tooltip';
-import {
- showEditAccountsModal,
- showEditNetworksModal,
-} from '../../../../../store/actions';
-import { useDispatch } from 'react-redux';
-import { AvatarGroup } from '../../../index';
+import { AvatarGroup, EditAccountsModal, EditNetworksModal } from '../../..';
import { AvatarType } from '../../../avatar-group/avatar-group.types';
-export const SiteCell = ({ networks, accounts }) => {
+export const SiteCell = ({
+ networks,
+ accounts,
+ onAccountsClick,
+ onNetworksClick,
+}) => {
const t = useI18nContext();
const dispatch = useDispatch();
const avatarNetworksData = networks.map((network) => ({
@@ -47,6 +48,9 @@ export const SiteCell = ({ networks, accounts }) => {
const avatarAccountsData = accounts.map((account) => ({
avatarValue: account.address,
}));
+ const [showEditAccountsModal, setShowEditAccountsModal] = useState(false);
+ const [showEditNetworksModal, setShowEditNetworksModal] = useState(false);
+
return (
<>
{
style={{ flex: '1', alignSelf: 'center' }}
gap={2}
onClick={() => {
- dispatch(showEditAccountsModal());
+ setShowEditAccountsModal(true);
}}
>
{
style={{ flex: '1', alignSelf: 'center' }}
gap={2}
onClick={() => {
- dispatch(showEditNetworksModal());
+ setShowEditNetworksModal(true);
}}
>
{
/>
+ {showEditNetworksModal ? (
+ setShowEditNetworksModal(false)}
+ onClick={onNetworksClick}
+ />
+ ) : null}
+ {showEditAccountsModal ? (
+ setShowEditAccountsModal(false)}
+ onClick={onAccountsClick}
+ />
+ ) : null}
>
);
};
diff --git a/ui/ducks/app/app.ts b/ui/ducks/app/app.ts
index e08ce5ef1c38..39dc257c0d54 100644
--- a/ui/ducks/app/app.ts
+++ b/ui/ducks/app/app.ts
@@ -34,8 +34,6 @@ type AppState = {
tokenId?: string;
ignoreErc20Token?: boolean;
};
- showEditAccountsModalOpen: boolean;
- showEditNetworksModalOpen: boolean;
showPermittedNetworkToastOpen: boolean;
showIpfsModalOpen: boolean;
keyringRemovalSnapModal: {
@@ -127,8 +125,6 @@ const initialState: AppState = {
qrCodeData: null,
networkDropdownOpen: false,
importNftsModal: { open: false },
- showEditAccountsModalOpen: false,
- showEditNetworksModalOpen: false,
showPermittedNetworkToastOpen: false,
showIpfsModalOpen: false,
showBasicFunctionalityModal: false,
@@ -264,12 +260,6 @@ export default function reduceApp(
showIpfsModalOpen: false,
};
- case actionConstants.SHOW_EDIT_NETWORKS_MODAL_OPEN:
- return {
- ...appState,
- showEditNetworksModalOpen: true,
- };
-
case actionConstants.SHOW_PERMITTED_NETWORK_TOAST_OPEN:
return {
...appState,
@@ -282,24 +272,6 @@ export default function reduceApp(
showPermittedNetworkToastOpen: false,
};
- case actionConstants.SHOW_EDIT_NETWORKS_MODAL_CLOSE:
- return {
- ...appState,
- showEditNetworksModalOpen: false,
- };
-
- case actionConstants.SHOW_EDIT_ACCOUNTS_MODAL_OPEN:
- return {
- ...appState,
- showEditAccountsModalOpen: true,
- };
-
- case actionConstants.SHOW_EDIT_ACCOUNTS_MODAL_CLOSE:
- return {
- ...appState,
- showEditAccountsModalOpen: false,
- };
-
case actionConstants.IMPORT_TOKENS_POPOVER_OPEN:
return {
...appState,
diff --git a/ui/pages/permissions-connect/choose-account/choose-account.js b/ui/pages/permissions-connect/choose-account/choose-account.js
index 8cc07a2743b2..03916bc2b901 100644
--- a/ui/pages/permissions-connect/choose-account/choose-account.js
+++ b/ui/pages/permissions-connect/choose-account/choose-account.js
@@ -189,4 +189,4 @@ ChooseAccount.propTypes = {
}),
};
-export default ChooseAccount;
\ No newline at end of file
+export default ChooseAccount;
diff --git a/ui/pages/routes/routes.component.js b/ui/pages/routes/routes.component.js
index 7120644dd7d9..01df40cb0aa8 100644
--- a/ui/pages/routes/routes.component.js
+++ b/ui/pages/routes/routes.component.js
@@ -34,8 +34,6 @@ import {
NetworkListMenu,
AccountDetails,
ImportNftsModal,
- EditAccountsModal,
- EditNetworksModal,
ImportTokensModal,
ToastContainer,
Toast,
@@ -192,12 +190,8 @@ export default class Routes extends Component {
accountDetailsAddress: PropTypes.string,
isImportNftsModalOpen: PropTypes.bool.isRequired,
hideImportNftsModal: PropTypes.func.isRequired,
- isEditNetworksModalOpen: PropTypes.bool.isRequired,
isPermittedNetworkToastOpen: PropTypes.bool.isRequired,
- hideEditNetworksModal: PropTypes.func.isRequired,
hidePermittedNetworkToast: PropTypes.func.isRequired,
- isEditAccountsModalOpen: PropTypes.bool.isRequired,
- hideEditAccountsModal: PropTypes.func.isRequired,
isIpfsModalOpen: PropTypes.bool.isRequired,
isBasicConfigurationModalOpen: PropTypes.bool.isRequired,
hideIpfsModal: PropTypes.func.isRequired,
@@ -801,7 +795,7 @@ export default class Routes extends Component {
`${REVIEW_PERMISSIONS}/${safeEncodedHost}`,
)
}
- onClose={() => hidePermittedNetworkToast()}
+ onClose={() => this.props.hidePermittedNetworkToast()}
/>
) : null}
@@ -868,10 +862,6 @@ export default class Routes extends Component {
location,
isImportNftsModalOpen,
hideImportNftsModal,
- isEditAccountsModalOpen,
- hideEditAccountsModal,
- isEditNetworksModalOpen,
- hideEditNetworksModal,
isIpfsModalOpen,
isBasicConfigurationModalOpen,
hideIpfsModal,
@@ -977,12 +967,6 @@ export default class Routes extends Component {
{isImportNftsModalOpen ? (
hideImportNftsModal()} />
) : null}
- {isEditAccountsModalOpen ? (
- hideEditAccountsModal()} />
- ) : null}
- {isEditNetworksModalOpen ? (
- hideEditNetworksModal()} />
- ) : null}
{isIpfsModalOpen ? (
hideIpfsModal()} />
diff --git a/ui/pages/routes/routes.container.js b/ui/pages/routes/routes.container.js
index abe9b661cb5d..dba24a8fb2ab 100644
--- a/ui/pages/routes/routes.container.js
+++ b/ui/pages/routes/routes.container.js
@@ -54,8 +54,6 @@ import {
hideKeyringRemovalResultModal,
///: END:ONLY_INCLUDE_IF
setEditedNetwork,
- hideEditAccountsModal,
- hideEditNetworksModal,
hidePermittedNetworkToast,
} from '../../store/actions';
import { pageChanged } from '../../ducks/history/history';
@@ -135,9 +133,7 @@ function mapStateToProps(state) {
accountDetailsAddress: state.appState.accountDetailsAddress,
isImportNftsModalOpen: state.appState.importNftsModal.open,
isIpfsModalOpen: state.appState.showIpfsModalOpen,
- isEditNetworksModalOpen: state.appState.showEditNetworksModalOpen,
isPermittedNetworkToastOpen: state.appState.showPermittedNetworkToastOpen,
- isEditAccountsModalOpen: state.appState.showEditAccountsModalOpen,
switchedNetworkDetails,
useNftDetection,
showNftEnablementToast,
@@ -171,8 +167,6 @@ function mapDispatchToProps(dispatch) {
toggleNetworkMenu: () => dispatch(toggleNetworkMenu()),
hideImportNftsModal: () => dispatch(hideImportNftsModal()),
hideIpfsModal: () => dispatch(hideIpfsModal()),
- hideEditAccountsModal: () => dispatch(hideEditAccountsModal()),
- hideEditNetworksModal: () => dispatch(hideEditNetworksModal()),
hidePermittedNetworkToast: () => dispatch(hidePermittedNetworkToast()),
hideImportTokensModal: () => dispatch(hideImportTokensModal()),
hideDeprecatedNetworkModal: () => dispatch(hideDeprecatedNetworkModal()),
diff --git a/ui/selectors/permissions.js b/ui/selectors/permissions.js
index bcda3bbf5397..52f9ed91152f 100644
--- a/ui/selectors/permissions.js
+++ b/ui/selectors/permissions.js
@@ -61,7 +61,7 @@ export function getPermittedAccounts(state, origin) {
}
export function getPermittedChains(state, origin) {
- return getChainsFromPermission(
+ return getChainsFromPermission(
getChainsPermissionFromSubject(subjectSelector(state, origin)),
);
}
diff --git a/ui/store/actionConstants.ts b/ui/store/actionConstants.ts
index 9d6dffc8ae65..8ed418346b9a 100644
--- a/ui/store/actionConstants.ts
+++ b/ui/store/actionConstants.ts
@@ -14,10 +14,6 @@ export const NETWORK_DROPDOWN_CLOSE = 'UI_NETWORK_DROPDOWN_CLOSE';
export const IMPORT_NFTS_MODAL_OPEN = 'UI_IMPORT_NFTS_MODAL_OPEN';
export const IMPORT_NFTS_MODAL_CLOSE = 'UI_IMPORT_NFTS_MODAL_CLOSE';
export const SHOW_IPFS_MODAL_OPEN = 'UI_IPFS_MODAL_OPEN';
-export const SHOW_EDIT_ACCOUNTS_MODAL_OPEN = 'UI_EDIT_ACCOUNTS_MODAL_OPEN';
-export const SHOW_EDIT_ACCOUNTS_MODAL_CLOSE = 'UI_EDIT_ACCOUNTS_MODAL_CLOSE';
-export const SHOW_EDIT_NETWORKS_MODAL_OPEN = 'UI_EDIT_NETWORKS_MODAL_OPEN';
-export const SHOW_EDIT_NETWORKS_MODAL_CLOSE = 'UI_EDIT_NETWORKS_MODAL_CLOSE';
export const SHOW_PERMITTED_NETWORK_TOAST_OPEN =
'UI_PERMITTED_NETWORK_TOAST_OPEN';
export const SHOW_PERMITTED_NETWORK_TOAST_CLOSE =
diff --git a/ui/store/actions.ts b/ui/store/actions.ts
index f64a8244962b..65ca15a2a2f7 100644
--- a/ui/store/actions.ts
+++ b/ui/store/actions.ts
@@ -116,6 +116,11 @@ import { getMethodDataAsync } from '../../shared/lib/four-byte';
import { DecodedTransactionDataResponse } from '../../shared/types/transaction-decode';
import { LastInteractedConfirmationInfo } from '../pages/confirmations/types/confirm';
import { EndTraceRequest } from '../../shared/lib/trace';
+import {
+ CaveatFactories,
+ PermissionNames,
+} from '../../app/scripts/controllers/permissions/specifications';
+import { CaveatTypes } from '../../shared/constants/permissions';
import * as actionConstants from './actionConstants';
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
import { updateCustodyState } from './institutional/institution-actions';
@@ -130,11 +135,6 @@ import {
MetaMaskReduxState,
TemporaryMessageDataType,
} from './store';
-import {
- CaveatFactories,
- PermissionNames,
-} from '../../app/scripts/controllers/permissions/specifications';
-import { CaveatTypes } from '../../shared/constants/permissions';
type CustomGasSettings = {
gas?: string;
@@ -1826,7 +1826,7 @@ export function removePermittedAccount(
origin: string,
address: string,
): ThunkAction {
- console.log("removed is done")
+ console.log('removed is done');
return async (dispatch: MetaMaskReduxDispatch) => {
await new Promise((resolve, reject) => {
callBackgroundMethod(
@@ -1851,17 +1851,13 @@ export function removePermittedChain(
): ThunkAction {
return async (dispatch: MetaMaskReduxDispatch) => {
await new Promise((resolve, reject) => {
- callBackgroundMethod(
- 'removePermittedChain',
- [origin, chain],
- (error) => {
- if (error) {
- reject(error);
- return;
- }
- resolve();
- },
- );
+ callBackgroundMethod('removePermittedChain', [origin, chain], (error) => {
+ if (error) {
+ reject(error);
+ return;
+ }
+ resolve();
+ });
});
await forceUpdateMetamaskState(dispatch);
};
@@ -2627,30 +2623,6 @@ export function hideImportNftsModal(): Action {
};
}
-export function showEditAccountsModal(): Action {
- return {
- type: actionConstants.SHOW_EDIT_ACCOUNTS_MODAL_OPEN,
- };
-}
-
-export function hideEditAccountsModal(): Action {
- return {
- type: actionConstants.SHOW_EDIT_ACCOUNTS_MODAL_CLOSE,
- };
-}
-
-export function hideEditNetworksModal(): Action {
- return {
- type: actionConstants.SHOW_EDIT_NETWORKS_MODAL_CLOSE,
- };
-}
-
-export function showEditNetworksModal(): Action {
- return {
- type: actionConstants.SHOW_EDIT_NETWORKS_MODAL_OPEN,
- };
-}
-
export function hidePermittedNetworkToast(): Action {
return {
type: actionConstants.SHOW_PERMITTED_NETWORK_TOAST_CLOSE,