From ecdc460769fc6daad66df23604ceee6456b29061 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 23 Jun 2026 23:29:51 -0700 Subject: Debit balance optimistically on pending send; pointer cursor on summaries - Headline balance now shows wallet.total (confirmed + mempool) instead of confirmed, so a pending outgoing spend is debited immediately rather than waiting for confirmation. The chain_stats-based confirmed balance counts a coin as yours until the spend is mined, which is why it didn't drop after broadcasting (incl. scanned-tx broadcasts). Incoming pending is still surfaced by the "+X pending" line. - summary { cursor: pointer } so the "Show QR" disclosure (and any other ) shows the hand cursor. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/app.js | 4 +++- src/style.css | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/app.js b/src/app.js index 54592a7..ba44544 100644 --- a/src/app.js +++ b/src/app.js @@ -757,7 +757,9 @@ function balanceCard() { 'div', { class: 'card balance' }, h('div', { class: 'small faint', style: 'text-transform:uppercase;letter-spacing:.05em' }, t('balance')), - h('div', { class: 'amt', style: firstLoad ? 'opacity:.3' : '' }, fmtAmount(wallet.confirmed), ' ', unitTag('unit')), + // Headline is the projected balance (confirmed + mempool), so a pending + // spend is debited immediately rather than waiting for confirmation. + h('div', { class: 'amt', style: firstLoad ? 'opacity:.3' : '' }, fmtAmount(wallet.total), ' ', unitTag('unit')), wallet.pending > 0 ? h( 'div', diff --git a/src/style.css b/src/style.css index 61a80af..192d178 100644 --- a/src/style.css +++ b/src/style.css @@ -50,6 +50,7 @@ h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; } .break { word-break: break-all; } a { color: var(--accent-ink); text-decoration: none; } a:hover { text-decoration: underline; } +summary { cursor: pointer; } /* ---- layout helpers ---- */ .row { display: flex; align-items: center; gap: 10px; } -- cgit v1.2.3