diff --git a/src/mappings/rewardsManager.ts b/src/mappings/rewardsManager.ts index a83eee3..443b127 100644 --- a/src/mappings/rewardsManager.ts +++ b/src/mappings/rewardsManager.ts @@ -85,6 +85,7 @@ export function handleRewardsAssigned(event: RewardsAssigned): void { graphNetwork.totalIndexingDelegatorRewards = graphNetwork.totalIndexingDelegatorRewards.plus( delegatorIndexingRewards, ) + graphNetwork.totalDelegatedTokens = graphNetwork.totalDelegatedTokens.plus(delegatorIndexingRewards) graphNetwork.save() } diff --git a/src/mappings/staking.ts b/src/mappings/staking.ts index ce70b65..1cd7d5e 100644 --- a/src/mappings/staking.ts +++ b/src/mappings/staking.ts @@ -659,6 +659,7 @@ export function handleRebateClaimed(event: RebateClaimed): void { graphNetwork.totalUnclaimedQueryFeeRebates = graphNetwork.totalUnclaimedQueryFeeRebates.minus( event.params.delegationFees.plus(event.params.tokens), ) + graphNetwork.totalDelegatedTokens = graphNetwork.totalDelegatedTokens.plus(event.params.delegationFees) graphNetwork.save() } @@ -742,6 +743,7 @@ export function handleRebateCollected(event: RebateCollected): void { graphNetwork.totalUnclaimedQueryFeeRebates = graphNetwork.totalUnclaimedQueryFeeRebates.minus( event.params.delegationRewards.plus(event.params.queryRebates), ) + graphNetwork.totalDelegatedTokens = graphNetwork.totalDelegatedTokens.plus(event.params.delegationRewards) graphNetwork.save() }