From 9396661cdaca41757c94de2699581c3e5d60d092 Mon Sep 17 00:00:00 2001 From: Shane Date: Tue, 22 Jul 2025 15:29:53 -0700 Subject: [PATCH] [PM-24000] Await SdkLoadService.Ready before attempting to use the PureCrypto SDK --- .../crypto/services/encrypt.service.implementation.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/common/src/key-management/crypto/services/encrypt.service.implementation.ts b/libs/common/src/key-management/crypto/services/encrypt.service.implementation.ts index 3e36fd334ec..5ff392c0f74 100644 --- a/libs/common/src/key-management/crypto/services/encrypt.service.implementation.ts +++ b/libs/common/src/key-management/crypto/services/encrypt.service.implementation.ts @@ -227,12 +227,11 @@ export class EncryptServiceImplementation implements EncryptService { if (decapsulationKey == null) { throw new Error("No decapsulationKey provided for decapsulation"); } - + await SdkLoadService.Ready; const keyBytes = PureCrypto.decapsulate_key_unsigned( encryptedSharedKey.encryptedString, decapsulationKey, ); - await SdkLoadService.Ready; return new SymmetricCryptoKey(keyBytes); }