feat: add debugging for private bookmark decryption

- Added detailed logging to understand why getHiddenBookmarks returns undefined
- Check bookmark list content and encryption format
- Verify account has decryption capabilities
- Pass full account object with extension capabilities to applesauce helpers
- This will help diagnose the NIP-44 vs NIP-04 encryption issue
This commit is contained in:
Gigi
2025-10-02 10:02:50 +02:00
parent 559e7ee944
commit 4be8eff80a
2 changed files with 20 additions and 2 deletions

View File

@@ -16,6 +16,7 @@ const Bookmarks: React.FC<BookmarksProps> = ({ relayPool, onLogout }) => {
const [bookmarks, setBookmarks] = useState<Bookmark[]>([])
const [loading, setLoading] = useState(true)
const activeAccount = Hooks.useActiveAccount()
const accountManager = Hooks.useAccountManager()
// Use ProfileModel to get user profile information
const profile = useEventModel(Models.ProfileModel, activeAccount ? [activeAccount.pubkey] : null)
@@ -45,7 +46,9 @@ const Bookmarks: React.FC<BookmarksProps> = ({ relayPool, onLogout }) => {
setLoading(false)
}, 15000) // 15 second timeout
await fetchBookmarks(relayPool, activeAccount, setBookmarks, setLoading, timeoutId)
// Get the full account object with extension capabilities
const fullAccount = accountManager.getActive()
await fetchBookmarks(relayPool, fullAccount || activeAccount, setBookmarks, setLoading, timeoutId)
}