mirror of
https://github.com/bitwarden/browser
synced 2026-02-11 14:04:03 +00:00
Address tools feedback
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user