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

feat(status-page): order the provers by count descending #13504

Merged
merged 7 commits into from
Apr 4, 2023
6 changes: 4 additions & 2 deletions packages/status-page/src/utils/getNumProvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ export type UniqueProverResponse = {
export const getNumProvers = async (
eventIndexerApiUrl: string
): Promise<UniqueProverResponse> => {
const resp = await axios.get<UniqueProverResponse>(
const uniqueProverResp = await axios.get<UniqueProverResponse>(
`${eventIndexerApiUrl}/uniqueProvers`
);
return resp.data;
uniqueProverResp.data.provers.sort((a, b) => b.count - a.count);
wolfderechter marked this conversation as resolved.
Show resolved Hide resolved

return uniqueProverResp.data;
};