diff options
| author | Adam Soltys <[email protected]> | 2026-06-27 15:55:53 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-06-27 15:55:53 -0700 |
| commit | e52327891130138d73e48ee8dd42781359a473c8 (patch) | |
| tree | e3753b13e77383fa5467d74e817d2b057be02629 /src/app.js | |
| parent | 2edad313d270354eb2f8e3420272897c14325f42 (diff) | |
| download | coinosv3-e52327891130138d73e48ee8dd42781359a473c8.tar.gz coinosv3-e52327891130138d73e48ee8dd42781359a473c8.zip | |
Auto-scan for silent payments + fold found value into balance
scanSilentPayments() now recomputes the balance so received SP value shows in the
wallet total (not just the Receive card), and gains a silent mode. It's triggered
automatically after each full scan and on the poll loop (incremental, cheap), so
payments appear without tapping anything. The Receive card now shows a status
line ('Watching for payments' / found amount) with a small manual Rescan instead
of a primary Scan button.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diffstat (limited to 'src/app.js')
| -rw-r--r-- | src/app.js | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -2254,18 +2254,22 @@ function silentPaymentReceiveCard(spAddr) { h('div', { style: 'align-self:center' }, h('div', { html: qrSvg(spAddr) })), h('div', { class: 'addr-box break', style: 'width:100%;font-size:12px' }, spAddr), copyBtn(spAddr, t('copyAddress')), - bal.count - ? h('div', { class: 'small', style: 'text-align:center' }, - t('spReceived', { amount: fmtAmount(bal.confirmed + bal.pending) + ' ' + unitLabel(), n: bal.count })) - : null, - h('button', { class: 'btn-block', disabled: wallet.spScanning, onClick: doSpScan }, - wallet.spScanning ? t('spScanning') : t('spScan')) + h('div', { class: 'row between', style: 'align-items:center' }, + h('span', { class: 'small muted' }, + wallet.spScanning + ? t('spScanning') + : bal.count + ? t('spReceived', { amount: fmtAmount(bal.confirmed + bal.pending) + ' ' + unitLabel(), n: bal.count }) + : t('spWatching')), + h('button', { class: 'linklike small', disabled: wallet.spScanning, onClick: doSpScan }, t('spRescan')) + ) ); } +// Auto-scanning runs on the poll loop; this is a manual full rescan. function doSpScan() { if (wallet.spScanning || wallet.offline) return; - wallet.scanSilentPayments().catch(() => {}).finally(render); + wallet.scanSilentPayments({ rescan: true }).catch(() => {}).finally(render); render(); } |
