aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/messages.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-30 21:30:00 -0700
committerAdam Soltys <[email protected]>2026-08-30 21:30:00 -0700
commit24a7ca81e58e4cc4b54d658fa5befc69f6a5498f (patch)
tree9f6417ea6ca581f0f457459b8285159ee30d1b90 /src/features/messages.js
parentd8b0e275ad76d2950e3d3ffcafd3c6c3d0ea0e7a (diff)
downloadcoinosv3-24a7ca81e58e4cc4b54d658fa5befc69f6a5498f.tar.gz
coinosv3-24a7ca81e58e4cc4b54d658fa5befc69f6a5498f.zip
The migration round trip stops eating its own homework: the ?migrated= return is stashed synchronously at boot and claimed whenever the wallet actually opens (the old 1.5s one-shot silently dropped it), the wizard's 'I'm done, continue' state survives the trip to coinos.io as a persisted step, the legacy page shows the claim in progress instead of re-asking, and a finished claim advances the wizard by itself. Fresh-seed polish riding along: the spending-setup ask stops waiting out registrar round trips that only exist for restored wallets, and the header punk paints synchronously instead of after an async identity fetch
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr
Diffstat (limited to 'src/features/messages.js')
-rw-r--r--src/features/messages.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/features/messages.js b/src/features/messages.js
index 637c2d1..2249c8f 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -2620,13 +2620,15 @@ export function messagesFeature(ctx) {
// A seed minted seconds ago has no kind-0 anywhere — don't make the
// avatar sit white while a relay lookup confirms that; paint the punk now.
identityGenerated() {
- identity().then((id) => {
- if (!id) return;
- const entry = { name: null, picture: null, t: Date.now() };
- profiles.set(id.pubkey, entry);
- persistProfile(id.pubkey, entry);
- scheduleRepaint();
- }).catch(() => {});
+ // Synchronous on purpose: identity() can await a signer resume, and
+ // the header sat avatar-less for that beat. A generated seed's pubkey
+ // is right here — paint the punk before the next frame.
+ const pk = (hook('nostrLoginIdentity') || {}).pubkey || (wallet.nostr && wallet.nostr.pk);
+ if (!pk) return;
+ const entry = { name: null, picture: null, t: Date.now() };
+ profiles.set(pk, entry);
+ persistProfile(pk, entry);
+ scheduleRepaint();
},
headerAvatar(pk) {
// A fresh node every render: the morph keeps the live element (and its