From c41081838b87ffaa0ac95694a9c3167fa1ec3749 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 1 Aug 2026 21:36:27 -0700 Subject: Username onboarding + the payment address leads Receive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/app.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index a3670c0..b02cd58 100644 --- a/src/app.js +++ b/src/app.js @@ -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(); }) -- cgit v1.2.3