feat: show top zappers #3

Merged
Kieran merged 9 commits from verbiricha/stream:top-zappers into main 2023-06-25 21:37:44 +00:00
Collaborator

Builds on Kieran/stream#1

Builds on https://git.v0l.io/Kieran/stream/pulls/1
verbiricha added 7 commits 2023-06-24 12:52:27 +00:00
verbiricha added 1 commit 2023-06-25 05:27:34 +00:00
verbiricha added 1 commit 2023-06-25 10:19:36 +00:00
Kieran reviewed 2023-06-25 12:04:39 +00:00
@ -37,1 +78,4 @@
const login = useLogin();
const events = messages.data ?? [];
const zaps = events
.filter((ev) => ev.kind === EventKind.ZapReceipt)
Owner

One problem here is that parseZap wont work unless we have the profile loaded, so we need a way to make sure that we're requesting those profiles otherwise the zaps will be invalid

One problem here is that parseZap wont work unless we have the profile loaded, so we need a way to make sure that we're requesting those profiles otherwise the zaps will be invalid
Author
Collaborator

Added loading when parse zap fails due to mising profile d3917fc418

Added loading when parse zap fails due to mising profile d3917fc418cf1cd5d799cb7f0fc97bc88f57f7fa
Kieran marked this conversation as resolved
@ -38,0 +80,4 @@
const zaps = events
.filter((ev) => ev.kind === EventKind.ZapReceipt)
.map((ev) => parseZap(ev, System.ProfileLoader.Cache))
.filter((z) => z);
Owner

Missing filter isValid for those parsed zaps

Missing filter `isValid` for those parsed zaps
Author
Collaborator

fixed.

fixed.
Kieran marked this conversation as resolved
verbiricha added 1 commit 2023-06-25 16:41:04 +00:00
verbiricha added 1 commit 2023-06-25 16:54:16 +00:00
verbiricha added 1 commit 2023-06-25 16:57:11 +00:00
Kieran reviewed 2023-06-25 19:22:54 +00:00
@ -85,0 +145,4 @@
parsed.errors.includes("zap service pubkey doesn't match") &&
parsed.sender
) {
System.ProfileLoader.TrackMetadata(parsed.sender);
Owner

You should return a function here to cleanup the profile tracking

return () => System.ProfileLoader.UntrackMetadata(parsed.sender);

I will also extend the system package to allow async fetching of profiles to make it a bit easier

You should return a function here to cleanup the profile tracking ``` return () => System.ProfileLoader.UntrackMetadata(parsed.sender); ``` I will also extend the system package to allow async fetching of profiles to make it a bit easier
Author
Collaborator

sounds good, added cleanup function return.

sounds good, added cleanup function return.
Kieran marked this conversation as resolved
verbiricha added 1 commit 2023-06-25 19:58:09 +00:00
verbiricha added 1 commit 2023-06-25 19:58:55 +00:00
Kieran approved these changes 2023-06-25 21:37:32 +00:00
Kieran merged commit 1444749fbb into main 2023-06-25 21:37:43 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Kieran/zap.stream#3
No description provided.