1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-16 10:45:20 +01:00

update send service to use new crypto service methods

This commit is contained in:
Jacob Fink 2023-05-30 12:55:40 -04:00
parent 076ab184fd
commit 3452e39b9d
No known key found for this signature in database
GPG Key ID: C2F7ACF05859D008

View File

@ -143,9 +143,9 @@ export class SendService implements InternalSendServiceAbstraction {
}
decSends = [];
const hasKey = await this.cryptoService.hasKey();
const hasKey = await this.cryptoService.hasUserKey();
if (!hasKey) {
throw new Error("No key.");
throw new Error("No user key found.");
}
const promises: Promise<any>[] = [];
@ -249,7 +249,7 @@ export class SendService implements InternalSendServiceAbstraction {
const sends = Object.values(sendsMap || {}).map((f) => new Send(f));
this._sends.next(sends);
if (await this.cryptoService.hasKey()) {
if (await this.cryptoService.hasUserKey()) {
this._sendViews.next(await this.decryptSends(sends));
}
}