aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-04 01:22:21 -0700
committerAdam Soltys <[email protected]>2026-08-04 01:22:21 -0700
commit1a32aa4e9f55cd174d9f571e749c0e154e21dc8d (patch)
tree1c8e034d9eede6ae329ae958627a29b3ad8fd3bb /src/features
parentddcba79565c797d06d1f1cc066f78197d0e8ce70 (diff)
downloadcoinosv3-1a32aa4e9f55cd174d9f571e749c0e154e21dc8d.tar.gz
coinosv3-1a32aa4e9f55cd174d9f571e749c0e154e21dc8d.zip
Claim with the login identity, so a migrated name can come home
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 <[email protected]>
Diffstat (limited to 'src/features')
-rw-r--r--src/features/names.js6
1 files changed, 5 insertions, 1 deletions
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; }