Skip to content

Commit

Permalink
fix: on-chain claim revocation
Browse files Browse the repository at this point in the history
  • Loading branch information
Harasz committed Jun 2, 2022
1 parent 74578c9 commit df9eeea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions e2e/claim-revocation.e2e.ts
Expand Up @@ -167,6 +167,7 @@ describe('On-chain claim revocation', () => {
...issuedClaim,
subject: subject.signerService.did,
namespace: claimType,
claimType,
};
};

Expand Down
9 changes: 7 additions & 2 deletions src/modules/claims/claims.service.ts
Expand Up @@ -955,7 +955,12 @@ export class ClaimsService {
if (claimIds) {
const claimsDetails = await Promise.all([
...claimIds.map(async (claimId) => {
return await this.getClaimById(claimId);
const claim = await this.getClaimById(claimId);
if (!claim) return undefined;
return {
namespace: claim.claimType,
subject: claim.subject,
};
}),
]);
claimsDetailsToRevoke = [
Expand Down Expand Up @@ -1066,7 +1071,7 @@ export class ClaimsService {
throw new Error(ERROR_MESSAGES.REVOKE_CLAIM_NOT_FOUND);
}

namespace = claimData.namespace;
namespace = claimData.claimType;
subject = claimData.subject;
}

Expand Down

0 comments on commit df9eeea

Please sign in to comment.