diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/app.js | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -2602,7 +2602,11 @@ function receiveTab() { // Until receiveSeenIndex has been baselined (post-scan, in enterWallet) it // stays null and we never celebrate. The recency guard additionally ensures an // already-old payment never celebrates when a wallet is opened. - if (ui.receiveSeenIndex != null && wallet.nextReceiveIndex > ui.receiveSeenIndex && hasRecentIncoming()) { + // While the Lightning "Received!" card is up (a reverse-swap claim is also an + // on-chain receive that advances the index), suppress this generic celebration + // so the two don't stack — its Done dismisses both. + const lnClaimShown = !!(ui.lnReceiveId && (() => { const r = swaps.list().find((s) => s.id === ui.lnReceiveId); return r && ['claimed', 'success'].includes(r.status); })()); + if (!lnClaimShown && ui.receiveSeenIndex != null && wallet.nextReceiveIndex > ui.receiveSeenIndex && hasRecentIncoming()) { // Mark it acknowledged as soon as it's shown — so a refresh or navigating // away (without tapping) won't bring the celebration back. It stays visible // this session (ui.receiveSeenIndex is unchanged) until the tap below. @@ -2672,7 +2676,7 @@ function lnReceiveContent() { h('div', { class: 'check-badge' }, '✓'), h('h3', { style: 'margin:0' }, t('lnReceived')), rec.received ? h('div', { class: 'amount-pos', style: 'font-size:18px' }, '+' + fmtAmount(rec.received) + ' ' + unitLabel()) : null, - h('button', { class: 'btn-block', onClick: () => { ui.lnReceiveId = null; ui.swapReverseAmt = ''; render(); } }, t('done')), + h('button', { class: 'btn-block', onClick: () => { ui.lnReceiveId = null; ui.swapReverseAmt = ''; ui.receiveSeenIndex = wallet.nextReceiveIndex; wallet.setReceiveAck(wallet.nextReceiveIndex); render(); } }, t('done')), ]; } if (rec) { |
