fix(profile): enable reactive profile fetch via address loader lookup relays and improve fallback display\n\n- Configure createAddressLoader with common profile relays (purplepag.es, primal, nostr.band)\n- Avoid sticky 'Loading profile...' label; fallback to short pubkey until profile loads

This commit is contained in:
Gigi
2025-10-03 00:16:04 +02:00
parent 21890f002d
commit 20f37b94e1
2 changed files with 9 additions and 7 deletions

View File

@@ -39,7 +39,14 @@ function App() {
console.log('Relay URLs:', relayUrls)
// Attach address/replaceable loaders so ProfileModel can fetch profiles
const addressLoader = createAddressLoader(pool, { eventStore: store })
const addressLoader = createAddressLoader(pool, {
eventStore: store,
lookupRelays: [
'wss://purplepag.es',
'wss://relay.primal.net',
'wss://relay.nostr.band'
]
})
store.addressableLoader = addressLoader
store.replaceableLoader = addressLoader

View File

@@ -90,12 +90,7 @@ const Bookmarks: React.FC<BookmarksProps> = ({ relayPool, onLogout }) => {
return profile.nip05
}
// Show loading state while profile is being fetched
if (profile === undefined) {
return 'Loading profile...'
}
// Fallback to formatted public key
// Fallback to formatted public key to avoid sticky loading text
return `${activeAccount.pubkey.slice(0, 8)}...${activeAccount.pubkey.slice(-8)}`
}