Remove stateService from browserPlatformUtilsService (#3362)

This commit is contained in:
Daniel James Smith 2022-08-24 00:22:18 +02:00 committed by GitHub
parent 4435c5bccf
commit 364d2f311e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 5 deletions

View File

@ -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);

View File

@ -66,7 +66,6 @@ const doAutoFillLogin = async (tab: chrome.tabs.Tab): Promise<void> => {
const platformUtils = new BrowserPlatformUtilsService(
null, // MessagingService
stateService,
null, // clipboardWriteCallback
null // biometricCallback
);

View File

@ -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(() => {

View File

@ -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<boolean>
) {}