diff --git a/aries_cloudagent/protocols/connections/v1_0/manager.py b/aries_cloudagent/protocols/connections/v1_0/manager.py index f5e21e3210..70f683363f 100644 --- a/aries_cloudagent/protocols/connections/v1_0/manager.py +++ b/aries_cloudagent/protocols/connections/v1_0/manager.py @@ -296,7 +296,10 @@ async def create_request( # Create connection request message if not my_endpoint: - my_endpoints = [self.context.settings.get("default_endpoint")] + my_endpoints = [] + default_endpoint = self.context.settings.get("default_endpoint") + if default_endpoint: + my_endpoints.append(default_endpoint) my_endpoints.extend(self.context.settings.get("additional_endpoints", [])) else: my_endpoints = [my_endpoint] @@ -478,7 +481,10 @@ async def create_response( # Create connection response message if not my_endpoint: - my_endpoints = [self.context.settings.get("default_endpoint")] + my_endpoints = [] + default_endpoint = self.context.settings.get("default_endpoint") + if default_endpoint: + my_endpoints.append(default_endpoint) my_endpoints.extend(self.context.settings.get("additional_endpoints", [])) did_doc = await self.create_did_document( my_info, connection.inbound_connection_id, my_endpoints diff --git a/aries_cloudagent/protocols/connections/v1_0/tests/test_manager.py b/aries_cloudagent/protocols/connections/v1_0/tests/test_manager.py index 354d2eaaff..28f22cb4a8 100644 --- a/aries_cloudagent/protocols/connections/v1_0/tests/test_manager.py +++ b/aries_cloudagent/protocols/connections/v1_0/tests/test_manager.py @@ -77,7 +77,7 @@ def setUp(self): { "default_endpoint": "http://aries.ca/endpoint", "default_label": "This guy", - "additional_endpoints": [], + "additional_endpoints": ["http://aries.ca/another-endpoint"], "debug.auto_accept_invites": True, "debug.auto_accept_requests": True, }