1
0
Fork 0
forked from aiolabs/libra

Excludes voided transactions from pending entries

Ensures that voided transactions are not included in the
list of pending entries. This prevents displaying
transactions that have been cancelled or reversed,
providing a more accurate view of truly pending items.
This commit is contained in:
padreug 2025-11-10 00:43:22 +01:00
commit 7f545ea88e

View file

@ -381,7 +381,8 @@ async def api_get_pending_entries(
pending_entries = []
for e in all_entries:
if e.get("t") == "Transaction" and e.get("flag") == "!":
# Only include pending transactions that are NOT voided
if e.get("t") == "Transaction" and e.get("flag") == "!" and "voided" not in e.get("tags", []):
# Extract entry ID from links field
entry_id = None
links = e.get("links", [])