From 4d8805fd958391a4d78256dd680509c11a0c6bd0 Mon Sep 17 00:00:00 2001 From: PatStLouis Date: Thu, 26 Sep 2024 04:08:38 +0000 Subject: [PATCH] add tags while injecting key during did creation Signed-off-by: PatStLouis --- aries_cloudagent/wallet/askar.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/aries_cloudagent/wallet/askar.py b/aries_cloudagent/wallet/askar.py index c6de6cd5f4..69f8c0282d 100644 --- a/aries_cloudagent/wallet/askar.py +++ b/aries_cloudagent/wallet/askar.py @@ -190,10 +190,7 @@ async def get_signing_key(self, verkey: str) -> KeyInfo: raise WalletNotFoundError("Unknown key: {}".format(verkey)) metadata = json.loads(key.metadata or "{}") - try: - kid = key.tags.get("kid") - except: - kid = None + kid = key.tags.get("kid") # FIXME implement key types return KeyInfo(verkey=verkey, metadata=metadata, key_type=ED25519, kid=kid) @@ -264,7 +261,7 @@ async def create_local_did( try: await self._session.handle.insert_key( - verkey, keypair, metadata=json.dumps(metadata) + verkey, keypair, metadata=json.dumps(metadata), tags={} ) except AskarError as err: if err.code == AskarErrorCode.DUPLICATE: