From 27ed364f4a89ca7bef2d77bc581413604f7afeec Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Tue, 28 May 2024 22:42:00 -0300 Subject: [PATCH] fix(zapController): purify event before getting invoice --- src/controllers/api/statuses.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/api/statuses.ts b/src/controllers/api/statuses.ts index 147e6e4..4185b96 100644 --- a/src/controllers/api/statuses.ts +++ b/src/controllers/api/statuses.ts @@ -13,7 +13,7 @@ import { getAncestors, getAuthor, getDescendants, getEvent } from '@/queries.ts' import { renderEventAccounts } from '@/views.ts'; import { renderReblog, renderStatus } from '@/views/mastodon/statuses.ts'; import { Storages } from '@/storages.ts'; -import { hydrateEvents } from '@/storages/hydrate.ts'; +import { hydrateEvents, purifyEvent } from '@/storages/hydrate.ts'; import { createEvent, paginationSchema, parseBody, updateListEvent } from '@/utils/api.ts'; import { getInvoice, getLnurl } from '@/utils/lnurl.ts'; import { lookupPubkey } from '@/utils/lookup.ts'; @@ -470,7 +470,7 @@ const zapController: AppController = async (c) => { return c.json(status, { headers: { - 'Ln-Invoice': await getInvoice({ amount, nostr, lnurl }, signal), + 'Ln-Invoice': await getInvoice({ amount, nostr: purifyEvent(nostr), lnurl }, signal), }, }); } else {