From 7a6a96a1902ce55d28d26b632ba97bd3e68d6f40 Mon Sep 17 00:00:00 2001 From: Ian Costanzo Date: Fri, 8 Oct 2021 16:22:43 -0700 Subject: [PATCH] Fix issue with cred limit on presentation endpoint Signed-off-by: Ian Costanzo --- aries_cloudagent/indy/sdk/holder.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/aries_cloudagent/indy/sdk/holder.py b/aries_cloudagent/indy/sdk/holder.py index f9d799eaf7..48cb2abac0 100644 --- a/aries_cloudagent/indy/sdk/holder.py +++ b/aries_cloudagent/indy/sdk/holder.py @@ -246,7 +246,7 @@ async def fetch(reft, limit): # must move database cursor manually if start > 0: await fetch(reft, start) - credentials = await fetch(reft, count - len(creds_dict)) + credentials = await fetch(reft, count) for cred in credentials: cred_id = cred["cred_info"]["referent"] @@ -255,8 +255,6 @@ async def fetch(reft, limit): creds_dict[cred_id] = cred else: creds_dict[cred_id]["presentation_referents"].add(reft) - if len(creds_dict) >= count: - break finally: # Always close await indy.anoncreds.prover_close_credentials_search_for_proof_req(