1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-01 09:13:54 +00:00

chore: remove old await bug workaround

This commit is contained in:
Andreas Coroiu
2025-11-03 11:55:52 +01:00
parent 77fbdb53d1
commit cf472fce0f
2 changed files with 6 additions and 6 deletions

View File

@@ -235,10 +235,11 @@ export class DefaultCipherEncryptionService implements CipherEncryptionService {
await using ref = await sdk.take();
const ciphersClient = await ref.value.vault().await.ciphers();
const result: DecryptCipherListResult = await ciphersClient.decrypt_list_with_failures(
ciphers.map((cipher) => cipher.toSdkCipher()),
).transfer;
const result: DecryptCipherListResult = await ref.value
.vault()
.await.ciphers()
.await.decrypt_list_with_failures(ciphers.map((cipher) => cipher.toSdkCipher())).await
.transfer;
const decryptedCiphers = result.successes;
const failedCiphers: Cipher[] = result.failures

View File

@@ -40,9 +40,8 @@ export class TotpService implements TotpServiceAbstraction {
return this.remoteSdkService.remoteClient$.pipe(
switchMap(async (sdk) => {
await using ref = await sdk!.take();
const totp = await ref.value.vault().await.totp();
// Transfer the TOTP response
return totp.generate_totp(key).transfer;
return await ref.value.vault().await.totp().await.generate_totp(key).await.transfer;
}),
shareReplay({ bufferSize: 1, refCount: true }),
);