From b64288c5dd21702701c311565dffcefdb585f05e Mon Sep 17 00:00:00 2001 From: ramvignesh-b Date: Mon, 13 Apr 2026 14:33:17 +0530 Subject: [PATCH] fix: type-cast sharingKey in crypto tests --- frontend/src/utils/crypto.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/utils/crypto.test.ts b/frontend/src/utils/crypto.test.ts index fa7300f..feaef4b 100644 --- a/frontend/src/utils/crypto.test.ts +++ b/frontend/src/utils/crypto.test.ts @@ -123,7 +123,7 @@ describe("encryptImage / decryptImage", () => { const result = await utils.encryptImage(file, masterKey); const encryptedLetter = await utils.encryptLetter("test", masterKey); - const sharingKey = encryptedLetter.sharingKey; + const sharingKey = encryptedLetter.sharingKey as string; const blobUrl = await utils.decryptImageWithSharingKey( result.encryptedBlob, @@ -145,7 +145,8 @@ describe("Sharing Key Decryption (TDD)", () => { const letterContent = "hello, guest"; const encryptedLetter = await utils.encryptLetter(letterContent, masterKey); - const sharingKey = encryptedLetter.sharingKey; + const sharingKey = encryptedLetter.sharingKey as string; + const decryptedLetter = await utils.decryptLetterWithSharingKey( encryptedLetter.encrypted_content, sharingKey,