aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-30 22:03:42 -0700
committerAdam Soltys <[email protected]>2026-08-30 22:03:42 -0700
commit46693593582a3123ca45c59b468a24807668fc7d (patch)
tree5f8436d137f7f830cc47b50dbba253a2282f780f /src/app.js
parent31748c85b02e725e75f3b4ebbef7c0cf17f1ecac (diff)
downloadcoinosv3-46693593582a3123ca45c59b468a24807668fc7d.tar.gz
coinosv3-46693593582a3123ca45c59b468a24807668fc7d.zip
A migrated coinos.io account keeps its face and its cover: the claim fetches the legacy avatar and banner and fills the kind 0's empty slots (fill, never overwrite — an existing nostr identity keeps its own look), the wizard's punk picker steps aside for a profile that already has a picture, and v3 finally wears cover photos — nostr's standard kind-0 banner renders full-bleed across the top of every profile card with the avatar overlapping it, settable by URL or upload in the profile editor
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr
Diffstat (limited to 'src/app.js')
-rw-r--r--src/app.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/app.js b/src/app.js
index 1a90546..3fb985f 100644
--- a/src/app.js
+++ b/src/app.js
@@ -3019,8 +3019,16 @@ function claimMigratedName() {
const attempt = () => {
const p = featureHook('namesClaimName', name);
if (!p || !p.then) { if (++tries < 12) return setTimeout(attempt, 5000); ui.migrating = null; return; }
- p.then(() => {
+ p.then(async () => {
try { localStorage.removeItem(MIGRATED_KEY); } catch {}
+ // Bring the old account's face and cover along — filled into empty
+ // kind-0 slots only. Bounded wait: the wizard's punk-picker skip
+ // checks the cached picture right after this, and losing the race
+ // would ask a migrated user to restyle the profile they already have.
+ await Promise.race([
+ Promise.resolve(featureHook('adoptLegacyProfile', name)).catch(() => {}),
+ new Promise((r) => setTimeout(r, 5000)),
+ ]);
ui.migrating = null;
// Mid-onboarding: the migrate step's job is done — move the wizard
// along instead of re-offering the page that was just completed. A