Open Israellund opened 1 month ago
Putting in blocked because we need to figure out what a member is.
To make it consistent, should it be number of profiles or addresses?
Will revert with product team feedback
how to count members — there are currently two counts
We should count by 1 (by profile)
Going to be 3 pointer. We only track address_count in the community table. It will need to be an async db migration along with extra application level logic.
(Supersedes #7807)
Describe the bug
There is a bug that shows all instances of members count to be different across the platform. It is detailed in ticket #7807 wherein a root cause analysis has been done.
My proposed bug fix is to add the below SQL code to the following useFetch routes:
useFetchRelatedCommunitiesQuery
useFetchActiveCommunitiesQuery
And to add the proper value returned to the client side instances:useFetchRelatedCommunitiesQuery
inuseDirectoryPageData
insideDirectoryPage.tsx
component.useFetchActiveCommunitiesQuery
insidecommunities.tsx
component.Below is the SQL query to be added, changing it to be functional with any
community_id
should also be implemented.WITH Counts AS ( SELECT "Profiles".id FROM "Profiles" JOIN "Addresses" ON "Profiles".user_id = "Addresses".user_id WHERE "Addresses".community_id = 'ethereum' GROUP BY "Profiles".id ) SELECT COUNT(*) FROM Counts;
This change would also solve ticket #7180