From 1a32aa4e9f55cd174d9f571e749c0e154e21dc8d Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 4 Aug 2026 01:22:21 -0700 Subject: Claim with the login identity, so a migrated name can come home MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The registrar now lets a migrated coinos user's nostr identity (re)take its own name — migration could land the claim in whatever wallet ran it, stranding the name there. The claim form signs with the (re)attached login identity when there is one; the wallet key alone could never prove the takeover. Co-Authored-By: Claude Fable 5 --- src/features/names.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/features/names.js b/src/features/names.js index fe822e7..8b7ae74 100644 --- a/src/features/names.js +++ b/src/features/names.js @@ -237,7 +237,11 @@ export function namesFeature(ctx) { if (!name) return; ui.busy = true; ui.nameClaimError = null; render(); try { - await claim(name); + // Sign with the login identity when one can be (re)attached: the + // registrar lets a migrated coinos user's own identity take their + // name back, which the wallet key alone could never prove. + const signer = await Promise.resolve(hook('nostrLoginResume')).catch(() => null); + await claim(name, signer ? { signer, manager: wallet.nostrPubkey() } : {}); ui.nameClaim = ''; toast(t('namesClaimed', { name: `${name}@${DOMAIN}` })); } catch (e) { ui.nameClaimError = e.message; } -- cgit v1.2.3