1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

Remove extra parameters in biometrics constructors (#8140)

This commit is contained in:
Daniel García
2024-02-28 18:13:48 +01:00
committed by GitHub
parent c0810ffd9e
commit 29a26266e5
3 changed files with 1 additions and 11 deletions

View File

@@ -178,7 +178,6 @@ export class Main {
this.biometricsService = new BiometricsService( this.biometricsService = new BiometricsService(
this.i18nService, this.i18nService,
this.windowMain, this.windowMain,
this.stateService,
this.logService, this.logService,
this.messagingService, this.messagingService,
process.platform, process.platform,

View File

@@ -3,7 +3,6 @@ import { mock, MockProxy } from "jest-mock-extended";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
import { BiometricStateService } from "@bitwarden/common/platform/biometrics/biometric-state.service"; import { BiometricStateService } from "@bitwarden/common/platform/biometrics/biometric-state.service";
import { UserId } from "@bitwarden/common/types/guid"; import { UserId } from "@bitwarden/common/types/guid";
@@ -24,7 +23,6 @@ jest.mock("@bitwarden/desktop-native", () => {
describe("biometrics tests", function () { describe("biometrics tests", function () {
const i18nService = mock<I18nService>(); const i18nService = mock<I18nService>();
const windowMain = mock<WindowMain>(); const windowMain = mock<WindowMain>();
const stateService = mock<StateService>();
const logService = mock<LogService>(); const logService = mock<LogService>();
const messagingService = mock<MessagingService>(); const messagingService = mock<MessagingService>();
const biometricStateService = mock<BiometricStateService>(); const biometricStateService = mock<BiometricStateService>();
@@ -34,7 +32,6 @@ describe("biometrics tests", function () {
const sut = new BiometricsService( const sut = new BiometricsService(
i18nService, i18nService,
windowMain, windowMain,
stateService,
logService, logService,
messagingService, messagingService,
process.platform, process.platform,
@@ -59,7 +56,6 @@ describe("biometrics tests", function () {
const sut = new BiometricsService( const sut = new BiometricsService(
i18nService, i18nService,
windowMain, windowMain,
stateService,
logService, logService,
messagingService, messagingService,
"win32", "win32",
@@ -75,7 +71,6 @@ describe("biometrics tests", function () {
const sut = new BiometricsService( const sut = new BiometricsService(
i18nService, i18nService,
windowMain, windowMain,
stateService,
logService, logService,
messagingService, messagingService,
"darwin", "darwin",
@@ -96,7 +91,6 @@ describe("biometrics tests", function () {
sut = new BiometricsService( sut = new BiometricsService(
i18nService, i18nService,
windowMain, windowMain,
stateService,
logService, logService,
messagingService, messagingService,
process.platform, process.platform,

View File

@@ -1,7 +1,6 @@
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
import { BiometricStateService } from "@bitwarden/common/platform/biometrics/biometric-state.service"; import { BiometricStateService } from "@bitwarden/common/platform/biometrics/biometric-state.service";
import { UserId } from "@bitwarden/common/types/guid"; import { UserId } from "@bitwarden/common/types/guid";
@@ -16,7 +15,6 @@ export class BiometricsService implements BiometricsServiceAbstraction {
constructor( constructor(
private i18nService: I18nService, private i18nService: I18nService,
private windowMain: WindowMain, private windowMain: WindowMain,
private stateService: StateService,
private logService: LogService, private logService: LogService,
private messagingService: MessagingService, private messagingService: MessagingService,
private platform: NodeJS.Platform, private platform: NodeJS.Platform,
@@ -41,7 +39,6 @@ export class BiometricsService implements BiometricsServiceAbstraction {
this.platformSpecificService = new BiometricWindowsMain( this.platformSpecificService = new BiometricWindowsMain(
this.i18nService, this.i18nService,
this.windowMain, this.windowMain,
this.stateService,
this.logService, this.logService,
); );
} }
@@ -49,7 +46,7 @@ export class BiometricsService implements BiometricsServiceAbstraction {
private loadMacOSService() { private loadMacOSService() {
// eslint-disable-next-line // eslint-disable-next-line
const BiometricDarwinMain = require("./biometric.darwin.main").default; const BiometricDarwinMain = require("./biometric.darwin.main").default;
this.platformSpecificService = new BiometricDarwinMain(this.i18nService, this.stateService); this.platformSpecificService = new BiometricDarwinMain(this.i18nService);
} }
private loadNoopBiometricsService() { private loadNoopBiometricsService() {