diff --git a/packages/profile-sync-controller/src/controllers/authentication/AuthenticationController.test.ts b/packages/profile-sync-controller/src/controllers/authentication/AuthenticationController.test.ts index c9553930e6..66f650dd44 100644 --- a/packages/profile-sync-controller/src/controllers/authentication/AuthenticationController.test.ts +++ b/packages/profile-sync-controller/src/controllers/authentication/AuthenticationController.test.ts @@ -10,6 +10,7 @@ import { mockEndpointLogin, } from './__fixtures__/mockServices'; import type { + Actions, AllowedActions, AuthenticationControllerState, } from './AuthenticationController'; @@ -271,7 +272,7 @@ describe('authentication/authentication-controller - getSessionProfile() tests', * @returns Auth Messenger */ function createAuthenticationMessenger() { - const messenger = new ControllerMessenger(); + const messenger = new ControllerMessenger(); return messenger.getRestricted({ name: 'AuthenticationController', allowedActions: [`SnapController:handleRequest`], @@ -310,13 +311,9 @@ function createMockAuthenticationMessenger() { ); } - const exhaustedMessengerMocks = (action: never) => { - throw new Error( - `MOCK_FAIL - unsupported messenger call: ${action as string}`, - ); - }; - - return exhaustedMessengerMocks(actionType); + throw new Error( + `MOCK_FAIL - unsupported messenger call: ${actionType as string}`, + ); }); return { messenger, mockSnapGetPublicKey, mockSnapSignMessage }; diff --git a/packages/profile-sync-controller/src/controllers/authentication/AuthenticationController.ts b/packages/profile-sync-controller/src/controllers/authentication/AuthenticationController.ts index 5eed4c09b6..fa9730e0e4 100644 --- a/packages/profile-sync-controller/src/controllers/authentication/AuthenticationController.ts +++ b/packages/profile-sync-controller/src/controllers/authentication/AuthenticationController.ts @@ -5,7 +5,6 @@ import type { import { BaseController } from '@metamask/base-controller'; import type { HandleSnapRequest } from '@metamask/snaps-controllers'; -import type { UserStorageControllerDisableProfileSyncing } from '../user-storage/UserStorageController'; import { createSnapPublicKeyRequest, createSnapSignMessageRequest, @@ -88,9 +87,7 @@ export type AuthenticationControllerGetSessionProfile = export type AuthenticationControllerIsSignedIn = ActionsObj['isSignedIn']; // Allowed Actions -export type AllowedActions = - | HandleSnapRequest - | UserStorageControllerDisableProfileSyncing; +export type AllowedActions = HandleSnapRequest; // Messenger export type AuthenticationControllerMessenger = RestrictedControllerMessenger< @@ -281,10 +278,6 @@ export default class AuthenticationController extends BaseController< }; } catch (e) { console.error('Failed to authenticate', e); - // Disable Profile Syncing - await this.messagingSystem.call( - 'UserStorageController:disableProfileSyncing', - ); const errorMessage = e instanceof Error ? e.message : JSON.stringify(e ?? ''); throw new Error(