From f64ff015750eacb4d6b54fe449e49f2e67c522b3 Mon Sep 17 00:00:00 2001 From: Ethan Sung Date: Mon, 22 Nov 2021 17:44:46 +0900 Subject: [PATCH] Fix error when connection request is received with public invitation under askar Signed-off-by: Ethan Sung --- aries_cloudagent/protocols/connections/v1_0/manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aries_cloudagent/protocols/connections/v1_0/manager.py b/aries_cloudagent/protocols/connections/v1_0/manager.py index 56f099d662..6611a6c673 100644 --- a/aries_cloudagent/protocols/connections/v1_0/manager.py +++ b/aries_cloudagent/protocols/connections/v1_0/manager.py @@ -589,7 +589,9 @@ async def receive_request( elif not self.profile.settings.get("public_invites"): raise ConnectionManagerError("Public invitations are not enabled") else: # request from public did - my_info = await wallet.create_local_did(DIDMethod.SOV, KeyType.ED25519) + async with self.profile.session() as session: + wallet = session.inject(BaseWallet) + my_info = await wallet.create_local_did(DIDMethod.SOV, KeyType.ED25519) # send update-keylist message with new recipient keys keylist_updates = await mediation_mgr.add_key( my_info.verkey, keylist_updates