From 815b3cc57d34c69575581ef93d5f036ebfe8eb35 Mon Sep 17 00:00:00 2001 From: Gigi Date: Wed, 8 Oct 2025 09:27:36 +0100 Subject: [PATCH] fix: correct type signature for addZapTags function - Changed event parameter type from NostrEvent to { tags: string[][] } - Allows function to accept both EventTemplate and NostrEvent - Fixes TypeScript error where EventTemplate was passed before signing - No functional changes, just type safety improvement --- src/services/highlightCreationService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/highlightCreationService.ts b/src/services/highlightCreationService.ts index 31394d56..707a577e 100644 --- a/src/services/highlightCreationService.ts +++ b/src/services/highlightCreationService.ts @@ -208,7 +208,7 @@ function extractContext(selectedText: string, articleContent: string): string | /** * Adds zap tags to a highlight event for split payments (NIP-57 Appendix G) * Respects existing zap tags in the source event (author group) - * @param event The highlight event to add zap tags to + * @param event The highlight event to add zap tags to (can be EventTemplate or NostrEvent) * @param highlighterPubkey The pubkey of the user creating the highlight * @param sourceEvent The source event (may contain existing zap tags) * @param highlighterWeight Weight to give to the highlighter (default 50) @@ -216,7 +216,7 @@ function extractContext(selectedText: string, articleContent: string): string | * @param authorWeight Weight to give to author(s) (default 50) */ function addZapTags( - event: NostrEvent, + event: { tags: string[][] }, highlighterPubkey: string, sourceEvent: NostrEvent, highlighterWeight: number = 50,