From 49a2dd2761fa6ede9f0de4d50cdc4c1c1f731147 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 2 Aug 2026 19:45:21 -0700 Subject: Identity polish: 12-char npub default names, no ellipsis, copyable npub The registrar's auto-claimed username and every npub-fallback display name use the npub's first 12 characters, shown whole (no truncation dots), and the profile page's npub gets a copy button. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi --- src/features/names.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/features/names.js') diff --git a/src/features/names.js b/src/features/names.js index d6acc6a..3952214 100644 --- a/src/features/names.js +++ b/src/features/names.js @@ -140,7 +140,7 @@ export function namesFeature(ctx) { // npub happens at login instead (adoptIdentity below), where a // signer is already live — an address must never wait on a popup. const own = wallet.nostrNpub && wallet.nostrNpub(); - if (own) { await claim(own.slice(0, 20), {}); st = load(); } + if (own) { await claim(own.slice(0, 12), {}); st = load(); } } checked = true; clearTimeout(deadline); deadline = null; @@ -167,7 +167,7 @@ export function namesFeature(ctx) { // wallet key to keep the record updated afterwards. async function adoptIdentity(signer, npub) { if (!signer || !npub || !available()) return null; - const name = npub.slice(0, 20); + const name = npub.slice(0, 12); if (load().name === name) return name; await claim(name, { signer, manager: wallet.nostrPubkey() }); render(); -- cgit v1.2.3