From f42f5c3697497e777fa613519ac3b7d13dc9b410 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 16 Jun 2026 00:30:52 -0700 Subject: Show pending txs in history with a clear unconfirmed indicator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WS-detected deposits now get added to history (previously the ingest advanced past the address so the tx never entered history — balance showed but History was empty). Pending txs render with a "⏳ pending" badge, an orange-tinted row, and "awaiting confirmation" so they're clearly distinct from confirmed ones. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/app.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index 29a8f8c..df6a654 100644 --- a/src/app.js +++ b/src/app.js @@ -1017,17 +1017,19 @@ function historyTab() { { class: 'list' }, wallet.txs.map((t) => { const incoming = t.net >= 0; - const display = incoming ? t.net : t.net; // net already signed return h( 'a', - { class: 'item', href: wallet.api.explorerTx(t.txid), target: '_blank', rel: 'noopener', style: 'color:inherit' }, + { class: 'item' + (t.confirmed ? '' : ' pendingtx'), href: wallet.api.explorerTx(t.txid), target: '_blank', rel: 'noopener', style: 'color:inherit' }, h('div', { class: `ico ${incoming ? 'in' : 'out'}` }, incoming ? '↓' : '↑'), h('div', { class: 'grow' }, - h('div', {}, incoming ? 'Received' : 'Sent'), - h('div', { class: 'small faint' }, t.confirmed ? timeAgo(t.blockTime) : 'unconfirmed') + h('div', { class: 'row gap6' }, + incoming ? 'Received' : 'Sent', + t.confirmed ? null : h('span', { class: 'tag pending' }, '⏳ pending') + ), + h('div', { class: 'small faint' }, t.confirmed ? timeAgo(t.blockTime) : 'awaiting confirmation') ), h('div', { style: 'text-align:right' }, - h('div', { class: incoming ? 'amount-pos' : 'amount-neg' }, (incoming ? '+' : '') + fmtAmount(display)), + h('div', { class: incoming ? 'amount-pos' : 'amount-neg' }, (incoming ? '+' : '') + fmtAmount(t.net)), !incoming && t.fee ? h('div', { class: 'small faint' }, `fee ${fmtAmount(t.fee)}`) : null ) ); @@ -1081,3 +1083,5 @@ async function importSnapshotFile(e) { // Restore a wallet left open in this tab; otherwise show the unlock screen. if (!restoreSession()) render(); + + -- cgit v1.2.3