Get rid of customevent

This commit is contained in:
Jon Staab
2024-08-19 09:06:39 -07:00
parent fafbf79a75
commit cf41ea58fd
4 changed files with 29 additions and 29 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
import {derived} from "svelte/store"
import {memoize, assoc} from "@welshman/lib"
import type {CustomEvent} from "@welshman/util"
import type {TrustedEvent} from "@welshman/util"
import {Repository, createEvent, Relay} from "@welshman/util"
import {withGetter} from "@welshman/store"
import {NetworkContext, Tracker} from "@welshman/net"
@@ -55,8 +55,8 @@ export const signer = withGetter(derived(session, getSigner))
const seenChallenges = new Set()
Object.assign(NetworkContext, {
onEvent: (url: string, event: CustomEvent) => tracker.track(event.id, url),
isDeleted: (url: string, event: CustomEvent) => repository.isDeleted(event),
onEvent: (url: string, event: TrustedEvent) => tracker.track(event.id, url),
isDeleted: (url: string, event: TrustedEvent) => repository.isDeleted(event),
onAuth: async (url: string, challenge: string) => {
if (seenChallenges.has(challenge)) {
return