Skip to content

Commit 7cc40c9

Browse files
authored
Merge pull request openwallet-foundation#1921 from sake/statuslist-fix-main
Leave credentialStatus element in the LD credential
2 parents 84fcfdc + e1c1713 commit 7cc40c9

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ async def receive_credential(
503503

504504
# Remove values from cred that are not part of detail
505505
cred_dict.pop("proof")
506-
credential_status = cred_dict.pop("credentialStatus", None)
506+
credential_status = cred_dict.get("credentialStatus", None)
507507
detail_status = detail.options.credential_status
508508

509509
if cred_dict != detail_dict["credential"]:

aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/tests/test_handler.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -770,13 +770,14 @@ async def test_receive_credential_x_credential_status_ne(self):
770770

771771
async def test_receive_credential_x_credential_status_ne_both_set(self):
772772
detail = deepcopy(LD_PROOF_VC_DETAIL)
773+
status_entry = {"type": "SomeRandomType"}
773774

774-
# Set credential status so it's only set on the detail
775-
# not the issued credential
775+
# Set credential status in both request and reference credential
776776
detail["options"]["credentialStatus"] = {"type": "CredentialStatusType"}
777+
detail["credential"]["credentialStatus"] = deepcopy(status_entry)
777778

778779
vc = deepcopy(LD_PROOF_VC)
779-
vc["credentialStatus"] = {"type": "SomeRandomType"}
780+
vc["credentialStatus"] = deepcopy(status_entry)
780781

781782
cred_issue = V20CredIssue(
782783
formats=[

0 commit comments

Comments
 (0)