From 36640dd400f0bf8344d8fb9d6cc9ab5793f93181 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Thu, 20 Feb 2025 19:21:20 -0300 Subject: [PATCH] refactor: explain better the 'toBeRedeemed' field --- packages/ditto/middleware/swapNutzapsMiddleware.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/ditto/middleware/swapNutzapsMiddleware.ts b/packages/ditto/middleware/swapNutzapsMiddleware.ts index e490a571..322187de 100644 --- a/packages/ditto/middleware/swapNutzapsMiddleware.ts +++ b/packages/ditto/middleware/swapNutzapsMiddleware.ts @@ -119,8 +119,12 @@ async function getLastRedeemedNutzap( } /** - * toBeRedeemed are the nutzaps that will be redeemed and saved in the kind 7376 - https://github.com/nostr-protocol/nips/blob/master/60.md#spending-history-event - * The tags format is: [ [ "e", "", "", "redeemed" ] ] + * toBeRedeemed are the nutzaps that will be redeemed into a kind 7375 and saved in the kind 7376 tags + * The tags format is: [ + * [ "e", "<9321-event-id>", "", "redeemed" ], // nutzap event that has been redeemed + * [ "p", "" ] // pubkey of the author of the 9321 event (nutzap sender) + * ] + * https://github.com/nostr-protocol/nips/blob/master/61.md#updating-nutzap-redemption-history */ type MintsToProofs = { [key: string]: { proofs: Proof[]; toBeRedeemed: string[][] } };