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

Fix a recent code-fencing issue with keyring snaps (#19874)

This commit is contained in:
Frederik Bolding 2023-07-06 11:15:14 +02:00 committed by GitHub
parent 1247e03a33
commit 5d3690aa24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1126,11 +1126,21 @@ export function enableSnap(
await forceUpdateMetamaskState(dispatch);
};
}
///: END:ONLY_INCLUDE_IN
// TODO: Clean this up.
///: BEGIN:ONLY_INCLUDE_IN(snaps)
export function removeSnap(
snapId: string,
): ThunkAction<void, MetaMaskReduxState, unknown, AnyAction> {
return async (dispatch: MetaMaskReduxDispatch, getState) => {
return async (
dispatch: MetaMaskReduxDispatch,
///: END:ONLY_INCLUDE_IN
///: BEGIN:ONLY_INCLUDE_IN(keyring-snaps)
getState,
///: END:ONLY_INCLUDE_IN
///: BEGIN:ONLY_INCLUDE_IN(snaps)
) => {
dispatch(showLoadingIndication());
///: END:ONLY_INCLUDE_IN
///: BEGIN:ONLY_INCLUDE_IN(keyring-snaps)
@ -1140,7 +1150,9 @@ export function removeSnap(
const isAccountsSnap =
subjects[snapId]?.permissions?.snap_manageAccounts !== undefined;
///: END:ONLY_INCLUDE_IN
///: BEGIN:ONLY_INCLUDE_IN(snaps)
try {
///: END:ONLY_INCLUDE_IN
///: BEGIN:ONLY_INCLUDE_IN(keyring-snaps)