diff options
| author | Adam Soltys <[email protected]> | 2026-08-02 19:45:21 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-02 19:45:21 -0700 |
| commit | 49a2dd2761fa6ede9f0de4d50cdc4c1c1f731147 (patch) | |
| tree | a2c16cfaebb8edc253b7a9909767568208db6ceb /src/features/names.js | |
| parent | fb814232c84d2b03782869c956fee57548e6f708 (diff) | |
| download | coinosv3-49a2dd2761fa6ede9f0de4d50cdc4c1c1f731147.tar.gz coinosv3-49a2dd2761fa6ede9f0de4d50cdc4c1c1f731147.zip | |
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 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi
Diffstat (limited to 'src/features/names.js')
| -rw-r--r-- | src/features/names.js | 4 |
1 files changed, 2 insertions, 2 deletions
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(); |
