From 1fbf7b3d26998e8a0f514b090614e3ba85f6de99 Mon Sep 17 00:00:00 2001 From: Padreug Date: Sat, 6 Jun 2026 20:45:55 +0200 Subject: [PATCH] fix(libra): exclude voided txs from balance Pending section BalancePage filtered tx.flag === '!' to compute pending count/sum/list. After the libra backend stops hiding voided transactions, those will arrive with flag='!' plus a 'voided' tag and would otherwise leak into the Pending section. Add the tag-aware exclusion to keep Pending showing only genuinely pending entries. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/accounting-app/views/BalancePage.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/accounting-app/views/BalancePage.vue b/src/accounting-app/views/BalancePage.vue index 1335021..8b6492b 100644 --- a/src/accounting-app/views/BalancePage.vue +++ b/src/accounting-app/views/BalancePage.vue @@ -98,8 +98,11 @@ async function loadData() { totalIncomeSats.value = balanceData.total_income_sats || 0 totalIncomeFiat.value = balanceData.total_income_fiat || {} - // Filter for pending transactions (flag = '!') - pendingTransactions.value = txData.entries.filter(tx => tx.flag === '!') + // Filter for pending transactions (flag = '!'), excluding voided ones + // (libra convention: voided keeps '!' flag and carries a 'voided' tag). + pendingTransactions.value = txData.entries.filter( + tx => tx.flag === '!' && !tx.tags?.includes('voided') + ) } catch (error) { console.error('[BalancePage] Error loading data:', error) toast.error('Failed to load balance data')