mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
update send service to use new crypto service methods
This commit is contained in:
@@ -143,9 +143,9 @@ export class SendService implements InternalSendServiceAbstraction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
decSends = [];
|
decSends = [];
|
||||||
const hasKey = await this.cryptoService.hasKey();
|
const hasKey = await this.cryptoService.hasUserKey();
|
||||||
if (!hasKey) {
|
if (!hasKey) {
|
||||||
throw new Error("No key.");
|
throw new Error("No user key found.");
|
||||||
}
|
}
|
||||||
|
|
||||||
const promises: Promise<any>[] = [];
|
const promises: Promise<any>[] = [];
|
||||||
@@ -249,7 +249,7 @@ export class SendService implements InternalSendServiceAbstraction {
|
|||||||
const sends = Object.values(sendsMap || {}).map((f) => new Send(f));
|
const sends = Object.values(sendsMap || {}).map((f) => new Send(f));
|
||||||
this._sends.next(sends);
|
this._sends.next(sends);
|
||||||
|
|
||||||
if (await this.cryptoService.hasKey()) {
|
if (await this.cryptoService.hasUserKey()) {
|
||||||
this._sendViews.next(await this.decryptSends(sends));
|
this._sendViews.next(await this.decryptSends(sends));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user