bug: profile zaps
This commit is contained in:
parent
6d7892ac66
commit
1458611fc7
@ -35,7 +35,7 @@ export default function useTimelineFeed(subject: TimelineSubject, options: Timel
|
||||
|
||||
let sub = new Subscriptions();
|
||||
sub.Id = `timeline:${subject.type}:${subject.discriminator}`;
|
||||
sub.Kinds = new Set([EventKind.TextNote, EventKind.Repost, EventKind.ZapReceipt]);
|
||||
sub.Kinds = new Set([EventKind.TextNote, EventKind.Repost]);
|
||||
switch (subject.type) {
|
||||
case "pubkey": {
|
||||
sub.Authors = new Set(subject.items);
|
||||
|
@ -7,7 +7,7 @@ import useSubscription from "./Subscription";
|
||||
export default function useZapsFeed(pubkey: HexKey) {
|
||||
const sub = useMemo(() => {
|
||||
let x = new Subscriptions();
|
||||
x.Id = `zaps:${pubkey}`;
|
||||
x.Id = `zaps:${pubkey.slice(0, 12)}`;
|
||||
x.Kinds = new Set([EventKind.ZapReceipt]);
|
||||
x.PTags = new Set([pubkey]);
|
||||
return x;
|
||||
|
@ -67,7 +67,7 @@ export default function ProfilePage() {
|
||||
const profileZaps = zapFeed.store.notes.map(parseZap).filter(z => z.valid && z.p === id && !z.e && z.zapper !== id)
|
||||
profileZaps.sort((a, b) => b.amount - a.amount)
|
||||
return profileZaps
|
||||
}, [zapFeed.store.notes, id])
|
||||
}, [zapFeed.store, id])
|
||||
const zapsTotal = zaps.reduce((acc, z) => acc + z.amount, 0)
|
||||
|
||||
useEffect(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user