persist the delegated credential in the offer for revocation purposes - #566
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the delegation offer acceptance flow so the issuer persists the newly issued delegated credential on the DelegationOffer document, enabling later revocation operations that require access to the credential’s credentialStatus metadata.
Changes:
- Persist the issued
delegatedCredentialonto the storeddelegationOfferdocument. - Move the
wallet.updateDocument(delegationOffer)call to occur after credential issuance so the stored offer includes the credential payload.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Persist revocation data on the delegation offer so the issuer can update it when revoking. | ||
| delegationOffer.credentialStatus = delegatedCredential.credentialStatus; | ||
| delegationOffer.credentialId = delegatedCredential.id; | ||
| delegationOffer.revocationData = { |
There was a problem hiding this comment.
Did you add tests to validate this is being stored? If so, I'd expect them to fail after this refactor
There was a problem hiding this comment.
We have revocation tests which is calling the revocation helpers directly and has access to the full credential. I just updated the test to ensure we assert the revocation data is there.
No description provided.