From 5e17844376a9bb826bb6a6c5536564bb553e0d73 Mon Sep 17 00:00:00 2001 From: MikeDiam Date: Thu, 14 Dec 2023 14:18:25 +0300 Subject: [PATCH] [rewards-chart] add rewards chart --- src/graphql/backend/vault/userRewardsQuery.graphql | 5 +++-- .../vault/requests/getUserRewards/modifyUserRewards.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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)),