Skip to content

Commit

Permalink
Formatting fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Costanzo <[email protected]>
  • Loading branch information
ianco committed Dec 7, 2021
1 parent 7367ce1 commit 26f1417
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions aries_cloudagent/indy/tests/test_verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,8 +867,8 @@ async def test_pre_verify(self):
"attr_name": "id",
"value": 4,
}
}
]
},
],
}
}
],
Expand Down
8 changes: 3 additions & 5 deletions aries_cloudagent/indy/verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,21 +260,19 @@ async def pre_verify(self, pres_req: dict, pres: dict):
for ge_proof in pres["proof"]["proofs"][
pres["requested_proof"]["predicates"][uuid]["sub_proof_index"]
]["primary_proof"]["ge_proofs"]:
print("ge_proof:", ge_proof)
pred = ge_proof["predicate"]
if pred["attr_name"] == canon_attr:
found = True
if pred["value"] == req_pred["p_value"]:
matched = True
break
if not matched:
raise ValueError(
f"Predicate value != p_value: {pred['attr_name']}"
)
raise ValueError(f"Predicate value != p_value: {pred['attr_name']}")
break
elif not found:
raise ValueError(f"Missing requested predicate '{uuid}'")
except (KeyError, TypeError) as e:
print(e)
except (KeyError, TypeError):
raise ValueError(f"Missing requested predicate '{uuid}'")

revealed_attrs = pres["requested_proof"].get("revealed_attrs", {})
Expand Down

0 comments on commit 26f1417

Please sign in to comment.