Skip to content

Commit

Permalink
fix: check updateRevocationStatusList
Browse files Browse the repository at this point in the history
  • Loading branch information
lotharking committed Dec 19, 2024
1 parent daeecf3 commit 43ff688
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/main/src/controllers/message/MessageService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 43ff688

Please sign in to comment.