Fix hasValidSignature, rename to isValid

This commit is contained in:
Jon Staab
2024-09-05 13:57:51 -07:00
parent 44f29c9da4
commit ed7efac977
3 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ export const getDefaultNetContext = () => ({
onAuth: onAuth,
onEvent: (url: string, event: TrustedEvent) => tracker.track(event.id, url),
isDeleted: (url: string, event: TrustedEvent) => repository.isDeleted(event),
hasValidSignature: (event: TrustedEvent) =>
isValid: (url: string, event: TrustedEvent) =>
getSession(event.pubkey) || (isSignedEvent(event) && hasValidSignature(event)),
optimizeSubscriptions: (subs: Subscription[]) => {
const [withRelays, withoutRelays] = partition(sub => sub.request.relays.length > 0, subs)