Fixed persistance issues

This commit is contained in:
Your Name
2025-09-20 15:33:14 -04:00
parent 966d9d0456
commit a7dceb1156
3 changed files with 289 additions and 19 deletions

View File

@@ -1085,11 +1085,18 @@ class Modal {
if (method === 'extension') {
console.log('Modal: Extension method - NOT installing facade, leaving window.nostr as extension');
// Save extension authentication state using global setAuthState function
if (typeof window.setAuthState === 'function') {
console.log('Modal: Saving extension auth state to storage');
window.setAuthState({ method, ...options }, { isolateSession: this.options?.isolateSession });
}
// Emit auth method selection directly for extension
const event = new CustomEvent('nlMethodSelected', {
detail: { method, ...options }
});
window.dispatchEvent(event);
this.close();
return;
}