diff options
| author | Adam Soltys <[email protected]> | 2026-06-25 17:24:30 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-06-25 17:24:30 -0700 |
| commit | 7bb1ec87f1e8e64ee32650faa7b029c843e4bebc (patch) | |
| tree | bc6a826f2fd3c9b0c3ad09a76a9ba06bc3003873 | |
| parent | fb420c0b73101a1c1beb5ca544380a9860823ec3 (diff) | |
| download | coinosv3-7bb1ec87f1e8e64ee32650faa7b029c843e4bebc.tar.gz coinosv3-7bb1ec87f1e8e64ee32650faa7b029c843e4bebc.zip | |
Already-claimed gift: offer 'Create a wallet anyway' or go home
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) <[email protected]>
| -rw-r--r-- | src/app.js | 13 | ||||
| -rw-r--r-- | src/i18n.js | 4 |
2 files changed, 13 insertions, 4 deletions
@@ -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', |
