diff --git a/src/graphql/backend/vault/userRewardsQuery.graphql b/src/graphql/backend/vault/userRewardsQuery.graphql index c686d152..306e206f 100644 --- a/src/graphql/backend/vault/userRewardsQuery.graphql +++ b/src/graphql/backend/vault/userRewardsQuery.graphql @@ -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 } } diff --git a/src/methods/vault/requests/getUserRewards/modifyUserRewards.ts b/src/methods/vault/requests/getUserRewards/modifyUserRewards.ts index 0a2c90cb..afd06278 100644 --- a/src/methods/vault/requests/getUserRewards/modifyUserRewards.ts +++ b/src/methods/vault/requests/getUserRewards/modifyUserRewards.ts @@ -5,7 +5,7 @@ import type { UserRewardsQueryPayload } from '../../../../graphql/backend/vault' export const modifyUserReward = (reward: Omit) => { - const totalRewards = String(reward.sumRewards) || '0' + const totalRewards = String(reward.dailyRewards) || '0' return { rewards: Number(formatEther(totalRewards)),