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
+4 -4
View File
@@ -1,5 +1,5 @@
import {hexToBech32} from '@welshman/lib'
import type {TrustedEvent} from './Events'
import type {CustomEvent} from './Events'
import {Tags} from "./Tags"
const DIVISORS = {
@@ -81,12 +81,12 @@ export type Zapper = {
}
export type Zap = {
request: TrustedEvent
response: TrustedEvent,
request: CustomEvent
response: CustomEvent,
invoiceAmount: number
}
export const zapFromEvent = (response: TrustedEvent, zapper: Zapper) => {
export const zapFromEvent = (response: CustomEvent, zapper: Zapper) => {
const responseMeta = Tags.fromEvent(response).asObject()
let zap: Zap