fix: only create kind 5 if there are events to delete

This commit is contained in:
P. Reis 2025-03-17 11:12:30 -03:00
parent c344cb6b74
commit 07d0d4c4e5

View file

@ -83,6 +83,8 @@ route.post('/mint/:quote_id', userMiddleware({ enc: 'nip44' }), async (c) => {
const expiredQuoteIds: string[] = [];
const deleteExpiredQuotes = async (ids: string[]) => {
if (ids.length === 0) return;
await createEvent({
kind: 5,
tags: ids.map((id) => ['e', id, conf.relay]),