mirror of
https://github.com/hoornet/vega.git
synced 2026-05-11 22:51:18 -07:00
Fix sent zaps: query kind 9735 receipts with #P tag instead of ephemeral kind 9734
This commit is contained in:
@@ -435,7 +435,8 @@ export async function fetchZapsReceived(pubkey: string, limit = 50): Promise<NDK
|
||||
|
||||
export async function fetchZapsSent(pubkey: string, limit = 50): Promise<NDKEvent[]> {
|
||||
const instance = getNDK();
|
||||
const filter: NDKFilter = { kinds: [NDKKind.ZapRequest], authors: [pubkey], limit };
|
||||
// Zap receipts (kind 9735) with uppercase P tag = the sender's pubkey
|
||||
const filter: NDKFilter = { kinds: [NDKKind.Zap], "#P": [pubkey], limit };
|
||||
const events = await instance.fetchEvents(filter, {
|
||||
cacheUsage: NDKSubscriptionCacheUsage.ONLY_RELAY,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user