Skip to content

Commit

Permalink
fix: asserts were wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
fubuloubu committed Jun 5, 2024
1 parent 5055e66 commit f195c12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ape_safe/client/mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ def post_transaction(
# NOTE: More strict than Safe API check that silently ignores if no signatures are valid or
# from delegates, but should help us to get correct logic for mock testing purposes
# NOTE: Using `assert` because this client is only meant for mock testing purposes
assert len(safe_tx_data.confirmations) > 0
assert all(
assert len(safe_tx_data.confirmations) == 0, "Must be a zero-conf txn"
assert any(
self.delegator_for_delegate(signer) in owners
for signer in filter(lambda signer: signer not in owners, signatures)
)
), "At least one signature must be from a valid owner of the safe"

tx_id = cast(SafeTxID, HexBytes(safe_tx_data.safe_tx_hash).hex())
self.transactions[tx_id] = safe_tx_data
Expand Down

0 comments on commit f195c12

Please sign in to comment.