From 436af47e7219126f4c9b4e8d25c99a98bf6c37cb Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 3 Aug 2026 13:04:46 -0700 Subject: Registrar: a migrated legacy name is claimable takenByCoinosUser now reads the account it finds: a live one still blocks the name, but one flagged migrated has handed receiving over, so v3 may claim it. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi --- names/server.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/names/server.js b/names/server.js index 74bcb9b..3ebfa48 100644 --- a/names/server.js +++ b/names/server.js @@ -376,7 +376,11 @@ async function takenByCoinosUser(domain, name) { if (domain !== 'coinos.io') return false; try { const r = await fetch(`https://coinos.io/api/users/${encodeURIComponent(name)}`); - return r.status === 200; + if (r.status !== 200) return false; + // A migrated account has handed its name over: the old site keeps the + // account and its history, but receiving belongs to us now. + const u = await r.json().catch(() => null); + return !(u && u.migrated); } catch { return true; } // can't verify → refuse rather than squat } -- cgit v1.2.3