Skip to content

Commit

Permalink
chore: print when no tx
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Nov 30, 2023
1 parent b8d3cbb commit 31e04da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ape_safe/_cli/pending.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ def _list(cli_ctx: SafeCliContext, network, safe) -> None:
"""

_ = network # Needed for NetworkBoundCommand
tx = None
for tx in safe.client.get_transactions(confirmed=False):
rich.print(
f"Transaction {tx.nonce}: "
f"({len(tx.confirmations)}/{safe.confirmations_required}) "
f"safe_tx_hash={tx.safe_tx_hash}"
)

if tx is None:
rich.print("There are no pending transactions.")


# NOTE: The handling of the `--execute` flag in the `pending` CLI
# all happens here EXCEPT if a pending tx is executable and no
Expand Down

0 comments on commit 31e04da

Please sign in to comment.