send zap to relays
This commit is contained in:
parent
c5b5581764
commit
d31466c0b8
2 changed files with 4 additions and 1 deletions
|
|
@ -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 }> {
|
||||
|
|
|
|||
|
|
@ -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 })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue