mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
fix: only create kind 5 if there are events to delete
This commit is contained in:
parent
c344cb6b74
commit
07d0d4c4e5
1 changed files with 2 additions and 0 deletions
|
|
@ -83,6 +83,8 @@ route.post('/mint/:quote_id', userMiddleware({ enc: 'nip44' }), async (c) => {
|
||||||
|
|
||||||
const expiredQuoteIds: string[] = [];
|
const expiredQuoteIds: string[] = [];
|
||||||
const deleteExpiredQuotes = async (ids: string[]) => {
|
const deleteExpiredQuotes = async (ids: string[]) => {
|
||||||
|
if (ids.length === 0) return;
|
||||||
|
|
||||||
await createEvent({
|
await createEvent({
|
||||||
kind: 5,
|
kind: 5,
|
||||||
tags: ids.map((id) => ['e', id, conf.relay]),
|
tags: ids.map((id) => ['e', id, conf.relay]),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue