Skip to content

Commit

Permalink
[rewards-chart] add rewards chart
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-diamond committed Dec 14, 2023
1 parent 1f0507b commit 5e17844
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/graphql/backend/vault/userRewardsQuery.graphql
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
query UserRewards($user: String!, $vaultAddress: String!, $dateFrom: date_as_timestamp!) {
userRewards(user: $user, vaultAddress: $vaultAddress, dateFrom: $dateFrom) {
date,
sumRewards,
date
sumRewards
dailyRewards
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { UserRewardsQueryPayload } from '../../../../graphql/backend/vault'


export const modifyUserReward = (reward: Omit<UserRewardsQueryPayload['userRewards'][number], 'date'>) => {
const totalRewards = String(reward.sumRewards) || '0'
const totalRewards = String(reward.dailyRewards) || '0'

return {
rewards: Number(formatEther(totalRewards)),
Expand Down

0 comments on commit 5e17844

Please sign in to comment.