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

Hide Earned in 24h until calculation fix (#3181) #3927

Merged
merged 1 commit into from
Dec 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ export const MemberRoleToggle = ({ role }: MemberRoleToggleProps) => {
</SidePaneText>
</SidePaneColumn>
</SidePaneRow>
<SidePaneRow>
<SidePaneLabel text="Earned in 24h" />
{/** TODO fix calculation <SidePaneRow>
<SidePaneLabel text="Earned in 7 days" />
<SidePaneColumn>
<SidePaneText>
<TokenValue value={currentDayEarnings} />
</SidePaneText>
</SidePaneColumn>
</SidePaneRow>
</SidePaneRow>**/}
<SidePaneRow>
<SidePaneLabel text="Role account" />
<SidePaneColumn>
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/working-groups/hooks/useWorkerEarnings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const useWorkerEarnings = (workerId: string) => {

const currentDayEarnings = data?.rewardPaidEvents
.filter((event) => {
// TODO use rewardPerBlock
const dayAgo = Date.now() - DAY_IN_MILLISECONDS
const eventDate = new Date(event.createdAt).getTime()
return eventDate > dayAgo
Expand Down