diff --git a/src/services/main/index.ts b/src/services/main/index.ts index a4528b76..368c378d 100644 --- a/src/services/main/index.ts +++ b/src/services/main/index.ts @@ -278,7 +278,7 @@ export default class { tags, } log({ unsigned: event }) - this.nostrSend({ type: 'app', appId: invoice.linkedApplication.app_id }, { type: 'event', event }) + this.nostrSend({ type: 'app', appId: invoice.linkedApplication.app_id }, { type: 'event', event }, zapInfo.relays || undefined) } async getNofferInvoice(offerReq: NofferData, appId: string): Promise<{ success: true, invoice: string } | { success: false, code: number, max: number }> { diff --git a/src/services/main/paymentManager.ts b/src/services/main/paymentManager.ts index 91f27554..a0079686 100644 --- a/src/services/main/paymentManager.ts +++ b/src/services/main/paymentManager.ts @@ -571,6 +571,9 @@ export default class { if (!verified) { throw new Error("nostr event not valid") } + if (nostrEvent.kind !== 9734) { + throw new Error("nostr event not a zap event") + } const p = this.parseTags("p", nostrEvent.tags, { required: true }) const e = this.parseTags("e", nostrEvent.tags) const relays = this.parseTags("relays", nostrEvent.tags, { required: true, multiples: true })