refactor(INJI-192):fix decrypt null data while downloading VC (#909)

Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com>
This commit is contained in:
srikanth716
2023-10-11 10:31:02 +05:30
committed by GitHub
parent e5963cfe01
commit a436be53f6
2 changed files with 5 additions and 2 deletions

View File

@@ -142,7 +142,10 @@ class Storage {
private static async readHmacForVC(key: string, encryptionKey: string) {
const encryptedHMACofCurrentVC = await MMKV.getItem(getVCKeyName(key));
return decryptJson(encryptionKey, encryptedHMACofCurrentVC);
if (encryptedHMACofCurrentVC) {
return decryptJson(encryptionKey, encryptedHMACofCurrentVC);
}
return null;
}
private static async readVCFromFile(key: string) {