mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
update password generation service to use new crypto service
This commit is contained in:
@@ -336,7 +336,7 @@ export class PasswordGenerationService implements PasswordGenerationServiceAbstr
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getHistory(): Promise<GeneratedPasswordHistory[]> {
|
async getHistory(): Promise<GeneratedPasswordHistory[]> {
|
||||||
const hasKey = await this.cryptoService.hasKey();
|
const hasKey = await this.cryptoService.hasUserKey();
|
||||||
if (!hasKey) {
|
if (!hasKey) {
|
||||||
return new Array<GeneratedPasswordHistory>();
|
return new Array<GeneratedPasswordHistory>();
|
||||||
}
|
}
|
||||||
@@ -356,7 +356,7 @@ export class PasswordGenerationService implements PasswordGenerationServiceAbstr
|
|||||||
|
|
||||||
async addHistory(password: string): Promise<void> {
|
async addHistory(password: string): Promise<void> {
|
||||||
// Cannot add new history if no key is available
|
// Cannot add new history if no key is available
|
||||||
const hasKey = await this.cryptoService.hasKey();
|
const hasKey = await this.cryptoService.hasUserKey();
|
||||||
if (!hasKey) {
|
if (!hasKey) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user