diff options
| author | Adam Soltys <[email protected]> | 2026-08-01 21:36:27 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-01 21:36:27 -0700 |
| commit | c41081838b87ffaa0ac95694a9c3167fa1ec3749 (patch) | |
| tree | 750cd53750ef2b652888ff1c8a20cf56cf4c12d9 /src/app.js | |
| parent | c17f3fb4dcaf8037eafdbd8d85c655da75d0c7d5 (diff) | |
| download | coinosv3-c41081838b87ffaa0ac95694a9c3167fa1ec3749.tar.gz coinosv3-c41081838b87ffaa0ac95694a9c3167fa1ec3749.zip | |
Username onboarding + the payment address leads Receive
New wallets must pick a username before entering the wallet: the
onboarding gate renders a claim screen until a name exists. Imported
seeds skip it — the registrar's new /pubkey lookup recovers the name
owned by the wallet's key, so nothing is retyped. If claiming errors
(registrar or ark unreachable) a do-it-later escape appears rather than
locking anyone away from funds; the prompt returns next open.
The Receive tab now defaults to the payment address — name QR + copy —
with the on-chain address and other modes behind it, and the claim form
inline for wallets that skipped onboarding.
Co-Authored-By: Claude Fable 5 <[email protected]>
Diffstat (limited to 'src/app.js')
| -rw-r--r-- | src/app.js | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -1878,6 +1878,12 @@ function vaultScreen() { } function walletScreen() { + // A feature can hold the wallet behind a required onboarding step (picking + // a username). Imported wallets skip it once their name is recovered. + const ob = featureHook('onboardingView'); + if (ob) { + return h('div', { class: 'col', style: 'gap:0' }, brandHeader(false), h('div', { class: 'mt16' }, ob)); + } return h( 'div', { class: 'col', style: 'gap:0' }, @@ -2048,11 +2054,14 @@ function receiveTab() { // the enabled features contribute (Lightning, silent payment, Ark, ...). const fresh = wallet.freshReceive(); const featModes = featureAll('receiveModes'); - let mode = ui.receiveType || 'address'; - if (mode !== 'address' && !featModes.some((m) => m.id === mode)) mode = 'address'; + // The payment name leads: it's the address most people should hand out. + const nameMode = featModes.find((m) => m.id === 'name'); + let mode = ui.receiveType || (nameMode ? 'name' : 'address'); + if (mode !== 'address' && !featModes.some((m) => m.id === mode)) mode = nameMode ? 'name' : 'address'; const opts = [ + ...(nameMode ? [{ id: 'name', label: nameMode.label, icon: nameMode.icon }] : []), { id: 'address', label: t('receiveAddressTab'), icon: BITCOIN_ICON(20) }, - ...featModes.map((m) => ({ id: m.id, label: m.label, icon: m.icon })), + ...featModes.filter((m) => m.id !== 'name').map((m) => ({ id: m.id, label: m.label, icon: m.icon })), ]; const seg = opts.length > 1 ? iconSelect(opts, mode, (id) => { ui.receiveType = id; render(); }) |
