From c8e6de17311e3eaa18a73c2aa0688c80e89db254 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 1 Aug 2026 22:46:19 -0700 Subject: Get an address immediately, without waiting on a signer prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The passive setup path asked the browser extension to sign the claim, so it sat behind a permission popup — 20s per attempt, retried, hence the minute-long spinner ending in the manual form. The wallet's own key now makes that claim: no signer, no prompt, no wait. Tying the address to the user's real npub happens at login instead, where the signer is already live, and nominates the wallet key to manage the record after. Failures are visible now rather than hidden: the pane shows why setup failed, the watchdog is 12s instead of 60s, internal timeouts are tighter, and the registrar logs every refusal with its reason. Co-Authored-By: Claude Fable 5 --- names/server.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'names/server.js') diff --git a/names/server.js b/names/server.js index 8f1971a..903fa68 100644 --- a/names/server.js +++ b/names/server.js @@ -242,7 +242,9 @@ function rateOk(ip, limit = 10) { // HTTP // --------------------------------------------------------------------------- -const json = (body, status = 200) => new Response(JSON.stringify(body), { +const json = (body, status = 200) => { + if (status >= 400) log(`→ ${status} ${JSON.stringify(body).slice(0, 120)}`); + return new Response(JSON.stringify(body), { status, headers: { 'content-type': 'application/json', @@ -250,7 +252,8 @@ const json = (body, status = 200) => new Response(JSON.stringify(body), { 'access-control-allow-headers': 'content-type,authorization', 'access-control-allow-methods': 'GET,POST,DELETE,OPTIONS', }, -}); + }); +}; Bun.serve({ port: CFG.port || 8798, -- cgit v1.2.3