Get rid of domain module, allow app to override default event type

This commit is contained in:
Jon Staab
2024-08-13 15:45:20 -07:00
parent 5a63273b9d
commit 149c29472c
33 changed files with 201 additions and 285 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import {Emitter, now} from '@welshman/lib'
import type {TrustedEvent, SignedEvent} from '@welshman/util'
import type {CustomEvent, SignedEvent} from '@welshman/util'
import {subscribe, publish} from '@welshman/net'
import type {Subscription, Publish} from '@welshman/net'
@@ -32,7 +32,7 @@ export const makeDvmRequest = (request: DVMRequestOptions) => {
const sub = subscribe({relays, timeout, filters})
const pub = publish({event, relays, timeout})
sub.emitter.on('event', (url: string, event: TrustedEvent) => {
sub.emitter.on('event', (url: string, event: CustomEvent) => {
if (event.kind === 7000) {
emitter.emit(DVMEvent.Progress, url, event)
} else {