feat(libra): show voided transactions in standalone #92
1 changed files with 5 additions and 2 deletions
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) <noreply@anthropic.com>
commit
1fbf7b3d26
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue