diff options
| author | Adam Soltys <[email protected]> | 2026-06-25 16:05:36 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-06-25 16:05:36 -0700 |
| commit | 656a8110d30fb0774902dbd6e92c173f5f6b072c (patch) | |
| tree | 1f2b4a5afed04020f1b71fbbc8664fce726faa8f /src/app.js | |
| parent | 124fee3c15556d62d6efd8714fd4501e95273ebd (diff) | |
| download | coinosv3-656a8110d30fb0774902dbd6e92c173f5f6b072c.tar.gz coinosv3-656a8110d30fb0774902dbd6e92c173f5f6b072c.zip | |
Gift claim: show a loading screen while checking, not the claimable amount
Avoids flashing 'You've been sent Bitcoin' before flipping to 'Already claimed'
for a spent gift. Offline fallback clears the checking flag so the loader can't
hang.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diffstat (limited to 'src/app.js')
| -rw-r--r-- | src/app.js | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -856,6 +856,7 @@ function enterOfflineFallback() { wallet.setOffline(true); wallet.deriveWindow(40); ui.offlineFallback = true; + ui.claimChecking = false; // can't verify a gift offline; don't hang on the loader ui.tab = 'settings'; render(); } @@ -1518,6 +1519,20 @@ function claimScreen() { ) ); } + // While verifying the gift is still unclaimed, show a loading screen rather + // than flashing the claimable amount (which would then jump to "already + // claimed" for a spent gift). + if (ui.claimChecking) { + return h( + 'div', + { class: 'col', style: 'gap:16px' }, + brandHeader(false), + h('div', { class: 'card col', style: 'align-items:center;text-align:center;gap:14px;padding:32px 14px' }, + h('span', { class: 'spinner' }), + h('p', { class: 'muted', style: 'margin:0' }, t('giftChecking')) + ) + ); + } // Already claimed (funding coin spent, possibly only in the mempool) — show a // dead end with a link to the claim, instead of a claimable amount. if (ui.claimTaken) { |
