aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app.js15
-rw-r--r--src/i18n.js1
2 files changed, 16 insertions, 0 deletions
diff --git a/src/app.js b/src/app.js
index 47f37fa..5ea8eec 100644
--- a/src/app.js
+++ b/src/app.js
@@ -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) {
diff --git a/src/i18n.js b/src/i18n.js
index 65171f7..2a52d22 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -207,6 +207,7 @@ const STR = {
giftSplitFirst: 'Split a coin first',
giftLockWhole: 'Lock the whole coin ({n})',
giftSplitFailed: 'Could not split the coin.',
+ giftChecking: 'Opening your gift…',
giftTakenTitle: 'Already claimed',
giftTakenBody: 'Sorry, this gift has already been claimed.',
giftHistoryTitle: 'Gift link',