From 43ff688b371255cf3acb4baf046c72272c49d823 Mon Sep 17 00:00:00 2001 From: Andres Vallecilla Date: Thu, 19 Dec 2024 08:20:51 -0500 Subject: [PATCH] fix: check updateRevocationStatusList --- packages/main/src/controllers/message/MessageService.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/main/src/controllers/message/MessageService.ts b/packages/main/src/controllers/message/MessageService.ts index c9d96a1..342c5d8 100644 --- a/packages/main/src/controllers/message/MessageService.ts +++ b/packages/main/src/controllers/message/MessageService.ts @@ -250,13 +250,16 @@ export class MessageService { ) if (!isRevocable) throw new Error(`Credential for threadId ${msg.threadId} is not revocable)`) - await agent.modules.anoncreds.updateRevocationStatusList({ + const uptStatusListResult = await agent.modules.anoncreds.updateRevocationStatusList({ revocationStatusList: { revocationRegistryDefinitionId: credential.getTag('anonCredsRevocationRegistryId') as string, revokedCredentialIndexes: [Number(credential.getTag('anonCredsCredentialRevocationId'))], }, options: {}, }) + if (!uptStatusListResult.revocationStatusListState.revocationStatusList) { + throw new Error(`Failed to update revocation status list`) + } await agent.credentials.sendRevocationNotification({ credentialRecordId: credential.id,