Skip to content

Commit

Permalink
Minor syntax update.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfarid27 committed Nov 7, 2024
1 parent 877196d commit 7bd0d7c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
13 changes: 6 additions & 7 deletions src/EventHandlers/Voter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ Voter.DistributeReward.handlerWithLoader({
? context.LiquidityPoolAggregator.get(poolAddress)
: null;

if (!poolAddress) {
context.log.warn(
`No pool address found for the gauge address ${event.params.gauge.toString()}`
);
}

const [currentLiquidityPool, rewardToken] = await Promise.all([
promisePool,
context.Token.get(
Expand All @@ -89,13 +95,6 @@ Voter.DistributeReward.handlerWithLoader({
),
]);

// If there is no pool address with the particular gauge address, log the error
if (!poolAddress) {
context.log.warn(
`No pool address found for the gauge address ${event.params.gauge.toString()}`
);
}

return { currentLiquidityPool, rewardToken };
},
handler: async ({ event, context, loaderReturn }) => {
Expand Down
7 changes: 6 additions & 1 deletion src/EventHandlers/VotingReward.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ VotingReward.NotifyReward.handlerWithLoader({
};

// Update the LiquidityPoolEntity in the DB
updateLiquidityPoolAggregator(lpDiff, currentLiquidityPool, new Date(event.block.timestamp * 1000), context);
updateLiquidityPoolAggregator(
lpDiff,
currentLiquidityPool,
new Date(event.block.timestamp * 1000),
context
);
}
}
},
Expand Down

0 comments on commit 7bd0d7c

Please sign in to comment.