Files
bitvid/js
google-labs-jules[bot]andPR0M3TH3AN a57947da0c fix(nostr): await nip-07 extension injection to resolve race conditions
This commit fixes a critical race condition where `window.nostr` might not be injected
before the app attempts to use it, causing failures in decryption (subscriptions, hashtags, DMs)
and login flows.

Changes:
- Updated `ensureExtensionPermissions` in `js/nostr/client.js` to verify `window.nostr` existence
  even when permissions are cached. If missing, it now awaits `waitForNip07Extension` instead of
  returning a false success.
- Updated `ensureActiveSignerForPubkey` in `js/nostr/client.js` to wait for the extension
  if permissions are cached but `window.nostr` is missing, ensuring a valid signer is created.

This ensures that the "Performance Analysis" optimization (skipping `enable()` calls based on cache)
does not break functionality when the extension injection is delayed.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-26 20:57:17 +00:00
..
2026-01-26 13:23:11 -05:00
2026-01-23 02:09:08 -05:00
2026-01-24 20:00:00 -05:00
2026-01-23 02:09:08 -05:00
2026-01-23 02:09:08 -05:00