fix: 🐛

This commit is contained in:
codytseng 2025-12-29 23:14:06 +08:00
parent 6dc662bd2b
commit eb6c017319
3 changed files with 17 additions and 12 deletions

View file

@ -98,8 +98,9 @@ export function NotificationProvider({ children }: { children: React.ReactNode }
try {
let eosed = false
const relayList = await client.fetchRelayList(pubkey)
const relays = relayList.read.length > 0 ? relayList.read.slice(0, 5) : BIG_RELAY_URLS
const subCloser = client.subscribe(
relayList.read.length > 0 ? relayList.read.slice(0, 5) : BIG_RELAY_URLS,
relays,
[
{
kinds: [
@ -135,7 +136,7 @@ export function NotificationProvider({ children }: { children: React.ReactNode }
return prev
}
client.emitNewEvent(evt)
client.emitNewEvent(evt, relays)
return [evt, ...prev]
})
}