diff options
| author | Adam Soltys <[email protected]> | 2026-06-16 00:30:52 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-06-16 00:30:52 -0700 |
| commit | f42f5c3697497e777fa613519ac3b7d13dc9b410 (patch) | |
| tree | 0fc0be7cb3b8466b31e94abcedb6fb72a87e205b /src/app.js | |
| parent | ed396fd93afdb6abec956175b00a871153e8e6da (diff) | |
| download | coinosv3-f42f5c3697497e777fa613519ac3b7d13dc9b410.tar.gz coinosv3-f42f5c3697497e777fa613519ac3b7d13dc9b410.zip | |
Show pending txs in history with a clear unconfirmed indicator
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) <[email protected]>
Diffstat (limited to 'src/app.js')
| -rw-r--r-- | src/app.js | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -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(); + + |
