Skip to content

Commit 96ea8e0

Browse files
authored
Fix demo implementation of vc_di cred issue (openwallet-foundation#3609)
* Fix demo implementation of vc_di cred issue Signed-off-by: Ian Costanzo <ian@anon-solutions.ca> * Oops formatting issue Signed-off-by: Ian Costanzo <ian@anon-solutions.ca> * Oops formatting issue Signed-off-by: Ian Costanzo <ian@anon-solutions.ca> --------- Signed-off-by: Ian Costanzo <ian@anon-solutions.ca>
1 parent c76dd09 commit 96ea8e0

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

acapy_agent/protocols/issue_credential/v2_0/formats/vc_di/handler.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,12 @@ async def _create():
376376
cred_request_metadata=cred_req_result["metadata"],
377377
)
378378

379+
if "prover_did" in cred_req_result["request"]:
380+
entropy = cred_req_result["request"]["prover_did"]
381+
else:
382+
entropy = cred_req_result["request"]["entropy"]
379383
anoncreds_link_secret_instance = AnoncredsLinkSecretRequest(
380-
entropy=cred_req_result["request"]["prover_did"],
384+
entropy=entropy,
381385
cred_def_id=cred_req_result["request"]["cred_def_id"],
382386
blinded_ms=cred_req_result["request"]["blinded_ms"],
383387
blinded_ms_correctness_proof=cred_req_result["request"][

demo/runners/faber.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ def generate_credential_offer(self, aip, cred_type, cred_def_id, exchange_tracin
128128
for (n, v) in self.cred_attrs[cred_def_id].items()
129129
],
130130
}
131-
if cred_type == CRED_FORMAT_ANONCREDS:
132-
_filter = {"anoncreds": {"cred_def_id": cred_def_id}}
133-
else:
131+
if cred_type == CRED_FORMAT_INDY:
134132
_filter = {"indy": {"cred_def_id": cred_def_id}}
133+
else:
134+
_filter = {"anoncreds": {"cred_def_id": cred_def_id}}
135135
offer_request = {
136136
"connection_id": self.connection_id,
137137
"comment": f"Offer on cred def id {cred_def_id}",

0 commit comments

Comments
 (0)