Skip to content

Commit

Permalink
Merge pull request #180 from dappforce/fix/top-users
Browse files Browse the repository at this point in the history
Make the top users stats exactly 24 hours
  • Loading branch information
olehmell authored Jan 19, 2024
2 parents 36d8154 + 6c03c6a commit 2d1b0ca
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/components/utils/datahub/active-staking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,8 @@ const GET_TOP_USERS = gql`
}
`
export async function getTopUsers(): Promise<TopUsers> {
const now = getDayAndWeekTimestamp().day
const from = dayjs(now * 1000)
.subtract(1, 'day')
.valueOf()
.toString()
const now = dayjs()
const from = now.subtract(1, 'day').valueOf().toString()
const res = await datahubQueryRequest<
{
activeStakingStakersRankedBySuperLikesForPeriod: {
Expand Down

0 comments on commit 2d1b0ca

Please sign in to comment.