1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-11 14:04:03 +00:00

Address tools feedback

This commit is contained in:
Bernd Schoolmann
2025-10-28 16:28:37 +01:00
parent e278511ed0
commit ca2bc2b9c5
8 changed files with 25 additions and 37 deletions

View File

@@ -5,8 +5,6 @@ import * as inquirer from "inquirer";
import { firstValueFrom } from "rxjs";
import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { getUserId } from "@bitwarden/common/auth/services/account.service";
import { CryptoFunctionService } from "@bitwarden/common/key-management/crypto/abstractions/crypto-function.service";
import { EncryptService } from "@bitwarden/common/key-management/crypto/abstractions/encrypt.service";
import { ErrorResponse } from "@bitwarden/common/models/response/error.response";
@@ -39,7 +37,6 @@ export class SendReceiveCommand extends DownloadCommand {
private platformUtilsService: PlatformUtilsService,
private environmentService: EnvironmentService,
private sendApiService: SendApiService,
private accountService: AccountService,
apiService: ApiService,
) {
super(encryptService, apiService);
@@ -155,8 +152,6 @@ export class SendReceiveCommand extends DownloadCommand {
key: Uint8Array,
): Promise<Response | SendAccessView> {
try {
const activeUserId = await firstValueFrom(this.accountService.activeAccount$.pipe(getUserId));
const sendResponse = await this.sendApiService.postSendAccess(
id,
this.sendAccessRequest,
@@ -165,7 +160,7 @@ export class SendReceiveCommand extends DownloadCommand {
const sendAccess = new SendAccess(sendResponse);
this.decKey = await this.keyService.makeSendKey(key);
return await sendAccess.decrypt(activeUserId, this.decKey);
return await sendAccess.decrypt(this.decKey);
} catch (e) {
if (e instanceof ErrorResponse) {
if (e.statusCode === 401) {

View File

@@ -123,7 +123,6 @@ export class SendProgram extends BaseProgram {
this.serviceContainer.platformUtilsService,
this.serviceContainer.environmentService,
this.serviceContainer.sendApiService,
this.serviceContainer.accountService,
this.serviceContainer.apiService,
);
const response = await cmd.run(url, options);