From 7bb1ec87f1e8e64ee32650faa7b029c843e4bebc Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 25 Jun 2026 17:24:30 -0700 Subject: Already-claimed gift: offer 'Create a wallet anyway' or go home MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The claim flow already generated a fresh wallet, so the dead-end screen now lets the opener keep it (→ back up the recovery phrase → into the wallet) or head to the home screen. The backup step's copy adapts (Claimed! vs Your new wallet). Co-Authored-By: Claude Opus 4.8 (1M context) --- src/app.js | 13 +++++++++---- src/i18n.js | 4 ++++ 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/app.js b/src/app.js index 0d22e56..91c858e 100644 --- a/src/app.js +++ b/src/app.js @@ -1481,14 +1481,15 @@ async function doClaim() { function claimScreen() { if (ui.claimStep === 'backup') { const words = wallet.mnemonic.split(' '); + const claimed = ui.claimedAmount > 0; // false when "create a wallet anyway" return h( 'div', { class: 'col', style: 'gap:16px' }, brandHeader(false), h('div', { class: 'card col', style: 'align-items:center;text-align:center;gap:8px' }, - h('div', { style: 'color:var(--green); font-size:72px; line-height:1' }, '✓'), - h('h2', { style: 'margin:0' }, t('claimedTitle')), - h('p', { class: 'muted', style: 'margin:0' }, t('claimedBody')) + h('div', { style: 'font-size:72px;line-height:1' + (claimed ? ';color:var(--green)' : '') }, claimed ? '✓' : '🔑'), + h('h2', { style: 'margin:0' }, claimed ? t('claimedTitle') : t('newWalletTitle')), + h('p', { class: 'muted', style: 'margin:0' }, claimed ? t('claimedBody') : t('newWalletBody')) ), h('div', { class: 'card col' }, h('h3', {}, t('recoveryPhrase')), @@ -1567,7 +1568,11 @@ function claimScreen() { ui.claimTaken.txid ? h('a', { class: 'btn btn-sm', href: wallet.api.explorerTx(ui.claimTaken.txid), target: '_blank', rel: 'noopener' }, t('viewOnMempool')) : null - ) + ), + // A fresh wallet was already generated for the claim — offer to keep it, + // or head back to the home screen. + h('button', { class: 'btn-primary btn-block', onClick: () => { ui.claimTaken = null; ui.claimedAmount = 0; ui.claimStep = 'backup'; render(); } }, t('createWalletAnyway')), + h('button', { class: 'btn-ghost btn-block', onClick: goHome }, t('goToHome')) ); } const pv = previewGift(ui.claimCode); diff --git a/src/i18n.js b/src/i18n.js index cd72ab5..bf6e807 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -210,6 +210,10 @@ const STR = { giftChecking: 'Opening your gift…', giftTakenTitle: 'Already claimed', giftTakenBody: 'Sorry, this gift has already been claimed.', + createWalletAnyway: 'Create a wallet anyway', + goToHome: 'Go to home', + newWalletTitle: 'Your new wallet', + newWalletBody: 'Back up your recovery phrase to keep it safe.', giftHistoryTitle: 'Gift link', giftUnclaimedTag: 'unclaimed', giftCancel: 'Cancel', -- cgit v1.2.3