diff --git a/src/mappings/position-manager.ts b/src/mappings/position-manager.ts index 5eaa1520..0cd81f4d 100644 --- a/src/mappings/position-manager.ts +++ b/src/mappings/position-manager.ts @@ -158,8 +158,12 @@ export function handleCollect(event: Collect): void { let token0 = Token.load(position.token0) let amount0 = convertTokenToDecimal(event.params.amount0, token0.decimals) + + let token1 = Token.load(position.token1) + let amount1 = convertTokenToDecimal(event.params.amount0, token1.decimals) + position.collectedFeesToken0 = position.collectedFeesToken0.plus(amount0) - position.collectedFeesToken1 = position.collectedFeesToken1.plus(amount0) + position.collectedFeesToken1 = position.collectedFeesToken1.plus(amount1) position = updateFeeVars(position!, event, event.params.tokenId) position.save()