From 54e6464abd4d4846ff6e59e34b97b98017439e9e Mon Sep 17 00:00:00 2001 From: Roman Reinert Date: Wed, 9 Nov 2022 14:15:51 +0000 Subject: [PATCH] fix claim format designation in presentation submission Signed-off-by: Roman Reinert --- aries_cloudagent/protocols/present_proof/dif/pres_exch.py | 2 +- .../protocols/present_proof/dif/pres_exch_handler.py | 2 +- .../protocols/present_proof/dif/tests/test_pres_exch.py | 2 +- .../present_proof/v2_0/formats/dif/tests/test_handler.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aries_cloudagent/protocols/present_proof/dif/pres_exch.py b/aries_cloudagent/protocols/present_proof/dif/pres_exch.py index 3155d28860..5b9cdfe1de 100644 --- a/aries_cloudagent/protocols/present_proof/dif/pres_exch.py +++ b/aries_cloudagent/protocols/present_proof/dif/pres_exch.py @@ -837,7 +837,7 @@ class Meta: fmt = fields.Str( description="Format", required=False, - default="ldp_vp", + default="ldp_vc", data_key="format", ) path = fields.Str( diff --git a/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py b/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py index 813dbe287d..3713fc444a 100644 --- a/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py +++ b/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py @@ -1356,7 +1356,7 @@ async def merge( if f"{cred_id}-{cred_id}" not in dict_of_descriptors: descriptor_map = InputDescriptorMapping( id=desc_id, - fmt="ldp_vp", + fmt="ldp_vc", path=(f"$.verifiableCredential[{dict_of_creds[cred_id]}]"), ) descriptors.append(descriptor_map) diff --git a/aries_cloudagent/protocols/present_proof/dif/tests/test_pres_exch.py b/aries_cloudagent/protocols/present_proof/dif/tests/test_pres_exch.py index 2709024263..b8515188cd 100644 --- a/aries_cloudagent/protocols/present_proof/dif/tests/test_pres_exch.py +++ b/aries_cloudagent/protocols/present_proof/dif/tests/test_pres_exch.py @@ -363,7 +363,7 @@ def test_verifiable_presentation_wrapper(self): "descriptor_map": [ { "id": "citizenship_input_1", - "format": "ldp_vp", + "format": "ldp_vc", "path": "$.verifiableCredential[0]", } ], diff --git a/aries_cloudagent/protocols/present_proof/v2_0/formats/dif/tests/test_handler.py b/aries_cloudagent/protocols/present_proof/v2_0/formats/dif/tests/test_handler.py index 85d4a9b8a2..42ad3618ac 100644 --- a/aries_cloudagent/protocols/present_proof/v2_0/formats/dif/tests/test_handler.py +++ b/aries_cloudagent/protocols/present_proof/v2_0/formats/dif/tests/test_handler.py @@ -199,7 +199,7 @@ "descriptor_map": [ { "id": "citizenship_input_1", - "format": "ldp_vp", + "format": "ldp_vc", "path": "$.verifiableCredential[0]", } ],