mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-11 16:07:15 +02:00
fix: deduplicate explicit relays in createZapRequest
Ensure params.relays is deduplicated before use, not just the automatically collected relays. This handles cases where CLI -r flags might specify duplicate relay URLs.
This commit is contained in:
@@ -58,7 +58,10 @@ export async function createZapRequest(
|
||||
|
||||
// Get relays for zap receipt publication
|
||||
// Priority: explicit params.relays > semantic author relays > sender read relays > aggregators
|
||||
let relays = params.relays;
|
||||
let relays: string[] | undefined = params.relays
|
||||
? [...new Set(params.relays)] // Deduplicate explicit relays
|
||||
: undefined;
|
||||
|
||||
if (!relays || relays.length === 0) {
|
||||
const collectedRelays: string[] = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user