1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-02 01:33:22 +00:00

remove validationService and update logService messages

This commit is contained in:
rr-bw
2025-11-12 12:02:58 -08:00
parent 23af699b98
commit 58372116cf
7 changed files with 3 additions and 20 deletions

View File

@@ -11,7 +11,6 @@ import { PendingAuthRequestsStateService } from "@bitwarden/common/auth/services
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
import { ActionsService } from "@bitwarden/common/platform/actions";
import {
ButtonLocation,
@@ -34,7 +33,6 @@ describe("ExtensionAuthRequestAnsweringService", () => {
let platformUtilsService: MockProxy<PlatformUtilsService>;
let systemNotificationsService: MockProxy<SystemNotificationsService>;
let logService: MockProxy<LogService>;
let validationService: MockProxy<ValidationService>;
let sut: AuthRequestAnsweringService;
@@ -54,7 +52,6 @@ describe("ExtensionAuthRequestAnsweringService", () => {
platformUtilsService = mock<PlatformUtilsService>();
systemNotificationsService = mock<SystemNotificationsService>();
logService = mock<LogService>();
validationService = mock<ValidationService>();
// Common defaults
authService.activeAccountStatus$ = of(AuthenticationStatus.Locked);
@@ -84,7 +81,6 @@ describe("ExtensionAuthRequestAnsweringService", () => {
platformUtilsService,
systemNotificationsService,
logService,
validationService,
);
});

View File

@@ -10,7 +10,6 @@ import { MasterPasswordServiceAbstraction } from "@bitwarden/common/key-manageme
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
import { ActionsService } from "@bitwarden/common/platform/actions";
import {
ButtonLocation,
@@ -35,7 +34,6 @@ export class ExtensionAuthRequestAnsweringService
private readonly platformUtilsService: PlatformUtilsService,
private readonly systemNotificationsService: SystemNotificationsService,
private readonly logService: LogService,
private readonly validationService: ValidationService,
) {
super(
accountService,
@@ -73,8 +71,7 @@ export class ExtensionAuthRequestAnsweringService
const accountInfo = accounts[authRequestUserId];
if (!accountInfo) {
this.logService.error(`Account not found for userId: ${authRequestUserId}`);
this.validationService.showError(`Account not found for userId: ${authRequestUserId}`);
this.logService.error("Account not found for authRequestUserId");
return;
}

View File

@@ -1180,6 +1180,7 @@ export default class MainBackground {
this.i18nService,
this.platformUtilsService,
this.systemNotificationService,
this.logService,
);
this.serverNotificationsService = new DefaultServerNotificationsService(

View File

@@ -101,7 +101,6 @@ import {
AbstractStorageService,
ObservableStorageService,
} from "@bitwarden/common/platform/abstractions/storage.service";
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
import { ActionsService } from "@bitwarden/common/platform/actions";
import { Message, MessageListener, MessageSender } from "@bitwarden/common/platform/messaging";
// eslint-disable-next-line no-restricted-imports -- Used for dependency injection
@@ -498,7 +497,6 @@ const safeProviders: SafeProvider[] = [
PlatformUtilsService,
SystemNotificationsService,
LogService,
ValidationService,
],
}),
safeProvider({

View File

@@ -90,7 +90,6 @@ import { SdkLoadService } from "@bitwarden/common/platform/abstractions/sdk/sdk-
import { StateService as StateServiceAbstraction } from "@bitwarden/common/platform/abstractions/state.service";
import { AbstractStorageService } from "@bitwarden/common/platform/abstractions/storage.service";
import { SystemService as SystemServiceAbstraction } from "@bitwarden/common/platform/abstractions/system.service";
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
import { Message, MessageListener, MessageSender } from "@bitwarden/common/platform/messaging";
// eslint-disable-next-line no-restricted-imports -- Used for dependency injection
import { SubjectMessageSender } from "@bitwarden/common/platform/messaging/internal";
@@ -500,7 +499,6 @@ const safeProviders: SafeProvider[] = [
PendingAuthRequestsStateService,
I18nServiceAbstraction,
LogService,
ValidationService,
],
}),
];

View File

@@ -9,7 +9,6 @@ import { ForceSetPasswordReason } from "@bitwarden/common/auth/models/domain/for
import { PendingAuthRequestsStateService } from "@bitwarden/common/auth/services/auth-request-answering/pending-auth-requests.state";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
import { LogService } from "@bitwarden/logging";
import { UserId } from "@bitwarden/user-core";
@@ -23,7 +22,6 @@ describe("DesktopAuthRequestAnsweringService", () => {
let pendingAuthRequestsState: MockProxy<PendingAuthRequestsStateService>;
let i18nService: MockProxy<I18nService>;
let logService: MockProxy<LogService>;
let validationService: MockProxy<ValidationService>;
let sut: AuthRequestAnsweringService;
@@ -49,7 +47,6 @@ describe("DesktopAuthRequestAnsweringService", () => {
pendingAuthRequestsState = mock<PendingAuthRequestsStateService>();
i18nService = mock<I18nService>();
logService = mock<LogService>();
validationService = mock<ValidationService>();
// Common defaults
authService.activeAccountStatus$ = of(AuthenticationStatus.Locked);
@@ -75,7 +72,6 @@ describe("DesktopAuthRequestAnsweringService", () => {
pendingAuthRequestsState,
i18nService,
logService,
validationService,
);
});

View File

@@ -8,7 +8,6 @@ import { PendingAuthRequestsStateService } from "@bitwarden/common/auth/services
import { MasterPasswordServiceAbstraction } from "@bitwarden/common/key-management/master-password/abstractions/master-password.service.abstraction";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
import { LogService } from "@bitwarden/logging";
import { UserId } from "@bitwarden/user-core";
@@ -24,7 +23,6 @@ export class DesktopAuthRequestAnsweringService
protected readonly pendingAuthRequestsState: PendingAuthRequestsStateService,
private readonly i18nService: I18nService,
private readonly logService: LogService,
private readonly validationService: ValidationService,
) {
super(
accountService,
@@ -68,8 +66,7 @@ export class DesktopAuthRequestAnsweringService
const accountInfo = accounts[authRequestUserId];
if (!accountInfo) {
this.logService.error(`Account not found for userId: ${authRequestUserId}`);
this.validationService.showError(`Account not found for userId: ${authRequestUserId}`);
this.logService.error("Account not found for authRequestUserId");
return;
}