diff --git a/aries_cloudagent/protocols/didexchange/v1_0/manager.py b/aries_cloudagent/protocols/didexchange/v1_0/manager.py index 2b5f9b984e..815e277cc4 100644 --- a/aries_cloudagent/protocols/didexchange/v1_0/manager.py +++ b/aries_cloudagent/protocols/didexchange/v1_0/manager.py @@ -973,10 +973,10 @@ async def accept_response( signed_did = await self.verify_rotate( wallet, response.did_rotate_attach, conn_rec.invitation_key ) - if their_did != response.did: + if their_did != signed_did: raise DIDXManagerError( f"Connection DID {their_did} " - f"does not match singed DID rotate {signed_did}" + f"does not match signed DID rotate {signed_did}" ) self._logger.debug( diff --git a/aries_cloudagent/protocols/didexchange/v1_0/tests/test_manager.py b/aries_cloudagent/protocols/didexchange/v1_0/tests/test_manager.py index 405f912a35..bb9ab8d05c 100644 --- a/aries_cloudagent/protocols/didexchange/v1_0/tests/test_manager.py +++ b/aries_cloudagent/protocols/didexchange/v1_0/tests/test_manager.py @@ -2014,6 +2014,9 @@ async def test_accept_response_find_by_thread_id_no_did_doc_attached(self): mock_response.did = TestConfig.test_target_did mock_response.did_doc_attach = None mock_response.did_rotate_attach.data.verify = mock.AsyncMock(return_value=True) + mock_response.did_rotate_attach.data.signed = ( + TestConfig.test_target_did.encode() + ) receipt = MessageReceipt( recipient_did=TestConfig.test_did,