From d01441edc71c2d4e18b120b40f71375cc73068d3 Mon Sep 17 00:00:00 2001 From: Ethan Sung Date: Tue, 23 Nov 2021 13:26:48 +0900 Subject: [PATCH 1/2] Fix bug when getting credentials on askar-profile Signed-off-by: Ethan Sung --- aries_cloudagent/indy/credx/holder.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aries_cloudagent/indy/credx/holder.py b/aries_cloudagent/indy/credx/holder.py index a099011915..437c59b041 100644 --- a/aries_cloudagent/indy/credx/holder.py +++ b/aries_cloudagent/indy/credx/holder.py @@ -255,7 +255,10 @@ async def get_credentials(self, start: int, count: int, wql: dict): result = [] try: - rows = self._profile.store.scan(CATEGORY_CREDENTIAL, wql, start, count) + rows = self._profile.store.scan( + CATEGORY_CREDENTIAL, wql, start, count, + self._profile.settings.get("wallet.askar_profile"), + ) async for row in rows: cred = Credential.load(row.raw_value) result.append(_make_cred_info(row.name, cred)) @@ -322,7 +325,8 @@ async def get_credentials_for_presentation_request_by_referent( tag_filter = {"$and": [tag_filter, extra_query]} rows = self._profile.store.scan( - CATEGORY_CREDENTIAL, tag_filter, start, count + CATEGORY_CREDENTIAL, tag_filter, start, count, + self._profile.settings.get("wallet.askar_profile"), ) async for row in rows: if row.name in creds: From 65acac86693e58c9b929c293f86c23bf88b82510 Mon Sep 17 00:00:00 2001 From: Ethan Sung Date: Wed, 24 Nov 2021 10:12:45 +0900 Subject: [PATCH 2/2] Fix formatting Signed-off-by: Ethan Sung --- aries_cloudagent/indy/credx/holder.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/aries_cloudagent/indy/credx/holder.py b/aries_cloudagent/indy/credx/holder.py index 437c59b041..d0ad6d5110 100644 --- a/aries_cloudagent/indy/credx/holder.py +++ b/aries_cloudagent/indy/credx/holder.py @@ -256,7 +256,10 @@ async def get_credentials(self, start: int, count: int, wql: dict): try: rows = self._profile.store.scan( - CATEGORY_CREDENTIAL, wql, start, count, + CATEGORY_CREDENTIAL, + wql, + start, + count, self._profile.settings.get("wallet.askar_profile"), ) async for row in rows: @@ -325,7 +328,10 @@ async def get_credentials_for_presentation_request_by_referent( tag_filter = {"$and": [tag_filter, extra_query]} rows = self._profile.store.scan( - CATEGORY_CREDENTIAL, tag_filter, start, count, + CATEGORY_CREDENTIAL, + tag_filter, + start, + count, self._profile.settings.get("wallet.askar_profile"), ) async for row in rows: