diff --git a/src/modules/rewards/components/StakePushSection.tsx b/src/modules/rewards/components/StakePushSection.tsx index 10cae3ed15..f3e6062b4e 100644 --- a/src/modules/rewards/components/StakePushSection.tsx +++ b/src/modules/rewards/components/StakePushSection.tsx @@ -25,7 +25,7 @@ export type StakePushPoints = { const StakePushSection: FC = ({ title, subtitle, timeline, lifeTime }) => { const { account, isWalletConnected } = useAccount(); const { isLocked } = useRewardsContext(); - const { stakePushArray, uniV2PushArray, isLoading, daysToReset } = useStakeRewardsResetTime({ + const { stakePushArray, uniV2PushArray, isLoading, daysToReset, refetchSendActivities } = useStakeRewardsResetTime({ lifeTime, }); const [errorMessage, setErrorMessage] = useState(''); @@ -184,7 +184,10 @@ const StakePushSection: FC = ({ title, subtitle, timeline, life hasEpochEnded={hasEpochEnded} allUsersActivity={allUsersActivity as StakeActivityResponse} isAllActivitiesLoading={isAllActivitiesLoading} - refetchActivity={refetchActivity} + refetchActivity={() => { + refetchActivity(); + refetchSendActivities(); + }} lifeTime={lifeTime} /> ))} diff --git a/src/modules/rewards/hooks/useStakeRewardsResetTime.tsx b/src/modules/rewards/hooks/useStakeRewardsResetTime.tsx index c61813fdfd..6e789562b2 100644 --- a/src/modules/rewards/hooks/useStakeRewardsResetTime.tsx +++ b/src/modules/rewards/hooks/useStakeRewardsResetTime.tsx @@ -65,7 +65,7 @@ const useStakeRewardsResetTime = ({ lifeTime }: StakeRewardsResetTime) => { const activityTitles = allPushArray?.map((activity) => activity.activityType); - const { data: sendRecentActivities } = useGetRewardActivityStatus( + const { data: sendRecentActivities, refetch: refetchSendActivities } = useGetRewardActivityStatus( { userId: userDetails?.userId as string, activities: activityTitles as string[], @@ -154,7 +154,7 @@ const useStakeRewardsResetTime = ({ lifeTime }: StakeRewardsResetTime) => { } }, [userDetails?.userId, isWalletConnected, isLoadingPushStakeData, isLoadingPushUniData, sendRecentActivities]); - return { stakePushArray, uniV2PushArray, isLoading, daysToReset }; + return { stakePushArray, uniV2PushArray, isLoading, daysToReset, refetchSendActivities }; }; export { useStakeRewardsResetTime };