1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

simplify updatedCipher (#14179)

This commit is contained in:
Anders Åberg
2025-04-09 20:23:44 +02:00
committed by GitHub
parent 411d195386
commit f3726e5ac2

View File

@@ -95,8 +95,7 @@ export class DesktopFido2UserInterfaceSession implements Fido2UserInterfaceSessi
private confirmCredentialSubject = new Subject<boolean>();
private createdCipher: Cipher = new Cipher();
private updatedCipher: CipherView = new CipherView();
private updatedCipher: CipherView;
private rpId = new BehaviorSubject<string>("");
private availableCipherIdsSubject = new BehaviorSubject<string[]>([""]);
@@ -238,14 +237,14 @@ export class DesktopFido2UserInterfaceSession implements Fido2UserInterfaceSessi
return { cipherId: this.updatedCipher.id, userVerified: userVerification };
} else {
// Create the credential
await this.createCipher({
const createdCipher = await this.createCipher({
credentialName,
userName,
rpId,
userHandle,
userVerification,
});
return { cipherId: this.createdCipher.id, userVerified: userVerification };
return { cipherId: createdCipher.id, userVerified: userVerification };
}
} finally {
// Make sure to clean up so the app is never stuck in modal mode?
@@ -306,7 +305,6 @@ export class DesktopFido2UserInterfaceSession implements Fido2UserInterfaceSessi
try {
const createdCipher = await this.cipherService.createWithServer(encCipher);
this.createdCipher = createdCipher;
return createdCipher;
} catch {