From 364d2f311e7a3c2e265e8e85836d7e678256d1a7 Mon Sep 17 00:00:00 2001 From: Daniel James Smith Date: Wed, 24 Aug 2022 00:22:18 +0200 Subject: [PATCH] Remove stateService from browserPlatformUtilsService (#3362) --- apps/browser/src/background/main.background.ts | 1 - apps/browser/src/listeners/onCommandListener.ts | 1 - apps/browser/src/services/browserPlatformUtils.service.spec.ts | 2 +- apps/browser/src/services/browserPlatformUtils.service.ts | 2 -- 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/browser/src/background/main.background.ts b/apps/browser/src/background/main.background.ts index b4edd387db8..e771740e91a 100644 --- a/apps/browser/src/background/main.background.ts +++ b/apps/browser/src/background/main.background.ts @@ -235,7 +235,6 @@ export default class MainBackground { }); this.platformUtilsService = new BrowserPlatformUtilsService( this.messagingService, - this.stateService, (clipboardValue, clearMs) => { if (this.systemService != null) { this.systemService.clearClipboard(clipboardValue, clearMs); diff --git a/apps/browser/src/listeners/onCommandListener.ts b/apps/browser/src/listeners/onCommandListener.ts index 0e64f8b77e8..3abcd69e807 100644 --- a/apps/browser/src/listeners/onCommandListener.ts +++ b/apps/browser/src/listeners/onCommandListener.ts @@ -66,7 +66,6 @@ const doAutoFillLogin = async (tab: chrome.tabs.Tab): Promise => { const platformUtils = new BrowserPlatformUtilsService( null, // MessagingService - stateService, null, // clipboardWriteCallback null // biometricCallback ); diff --git a/apps/browser/src/services/browserPlatformUtils.service.spec.ts b/apps/browser/src/services/browserPlatformUtils.service.spec.ts index cc602888059..21034bcfa47 100644 --- a/apps/browser/src/services/browserPlatformUtils.service.spec.ts +++ b/apps/browser/src/services/browserPlatformUtils.service.spec.ts @@ -16,7 +16,7 @@ describe("Browser Utils Service", () => { let browserPlatformUtilsService: BrowserPlatformUtilsService; beforeEach(() => { (window as any).matchMedia = jest.fn().mockReturnValueOnce({}); - browserPlatformUtilsService = new BrowserPlatformUtilsService(null, null, null, null); + browserPlatformUtilsService = new BrowserPlatformUtilsService(null, null, null); }); afterEach(() => { diff --git a/apps/browser/src/services/browserPlatformUtils.service.ts b/apps/browser/src/services/browserPlatformUtils.service.ts index 2cf54eda81c..5e31d64dc03 100644 --- a/apps/browser/src/services/browserPlatformUtils.service.ts +++ b/apps/browser/src/services/browserPlatformUtils.service.ts @@ -5,7 +5,6 @@ import { DeviceType } from "@bitwarden/common/enums/deviceType"; import { BrowserApi } from "../browser/browserApi"; import { SafariApp } from "../browser/safariApp"; -import { StateService } from "../services/abstractions/state.service"; const DialogPromiseExpiration = 600000; // 10 minutes @@ -19,7 +18,6 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService constructor( private messagingService: MessagingService, - private stateService: StateService, private clipboardWriteCallback: (clipboardValue: string, clearMs: number) => void, private biometricCallback: () => Promise ) {}