Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add earnings volume endpoint #331

Merged
merged 3 commits into from
May 23, 2024

Conversation

ikprk
Copy link
Contributor

@ikprk ikprk commented May 14, 2024

No description provided.

@ikprk ikprk requested a review from zeeshanakram3 May 14, 2024 11:54
COALESCE(event.data->>'amount', '0')::bigint
) AS "total_rewards_volume",
SUM(
COALESCE(event.data->>'pricePaid', '0')::bigint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pricePaid field does not exist on any event

Copy link
Contributor

@zeeshanakram3 zeeshanakram3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a small comment. But I think it can be deployed without it.

LEFT JOIN bid AS winning_bid ON "data"->>'winningBid' = winning_bid.id
WHERE
"event"."data"->>'isTypeOf' IN (
'ChannelPaymentMadeEventData',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'ChannelPaymentMadeEventData',
'ChannelPaymentMadeEventData',
'ChannelRewardClaimedEventData',
'ChannelRewardClaimedAndWithdrawnEventData',

I think you should have to more event types for total rewards volume

@zeeshanakram3 zeeshanakram3 merged commit 3b5e144 into Joystream:master May 23, 2024
7 checks passed
malchililj pushed a commit to malchililj/orion that referenced this pull request Sep 3, 2024
* Add earnings volume endpoint

* CR fix v1

* Correct field name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants