Skip to content

Commit

Permalink
Merge branch 'main' into fix/mediated-conn-response
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwhitehead authored Feb 23, 2022
2 parents e4946e1 + 27248f0 commit dd4b85b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
4 changes: 4 additions & 0 deletions aries_cloudagent/protocols/connections/v1_0/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ class ConnectionsListQueryStringSchema(OpenAPISchema):
),
)
their_did = fields.Str(description="Their DID", required=False, **INDY_DID)
their_public_did = fields.Str(
description="Their Public DID", required=False, **INDY_DID
)
their_role = fields.Str(
description="Their role in the connection protocol",
required=False,
Expand Down Expand Up @@ -332,6 +335,7 @@ async def connections_list(request: web.BaseRequest):
"their_did",
"request_id",
"invitation_key",
"their_public_did",
):
if param_name in request.query and request.query[param_name] != "":
tag_filter[param_name] = request.query[param_name]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ async def test_connections_list(self):
"their_role": ConnRecord.Role.REQUESTER.rfc160,
"connection_protocol": ConnRecord.Protocol.RFC_0160.aries_protocol,
"invitation_key": "some-invitation-key",
"their_public_did": "a_public_did",
}

STATE_COMPLETED = ConnRecord.State.COMPLETED
Expand Down Expand Up @@ -89,7 +90,11 @@ async def test_connections_list(self):
await test_module.connections_list(self.request)
mock_conn_rec.query.assert_called_once_with(
ANY,
{"invitation_id": "dummy", "invitation_key": "some-invitation-key"},
{
"invitation_id": "dummy",
"invitation_key": "some-invitation-key",
"their_public_did": "a_public_did",
},
post_filter_positive={
"their_role": [v for v in ConnRecord.Role.REQUESTER.value],
"connection_protocol": ConnRecord.Protocol.RFC_0160.aries_protocol,
Expand Down
10 changes: 5 additions & 5 deletions aries_cloudagent/protocols/present_proof/v2_0/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1197,13 +1197,13 @@ async def present_proof_problem_report(request: web.BaseRequest):
description = body["description"]

try:
async with await context.profile.session() as session:
async with context.profile.session() as session:
pres_ex_record = await V20PresExRecord.retrieve_by_id(session, pres_ex_id)
await pres_ex_record.save_error_state(
session,
reason=f"created problem report: {description}",
)
report = problem_report_for_record(pres_ex_record, description)
await pres_ex_record.save_error_state(
session,
reason=f"created problem report: {description}",
)
except StorageNotFoundError as err: # other party does not care about meta-problems
raise web.HTTPNotFound(reason=err.roll_up) from err
except StorageError as err:
Expand Down

0 comments on commit dd4b85b

Please sign in to comment.