From 11142cc1ae40bf8dc459537cbbc169d813a0959b Mon Sep 17 00:00:00 2001 From: mendesfabio Date: Sun, 18 Feb 2024 21:38:48 -0300 Subject: [PATCH] fix preferential gauges --- src/gaugeController.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gaugeController.ts b/src/gaugeController.ts index 9743e8a..f153952 100644 --- a/src/gaugeController.ts +++ b/src/gaugeController.ts @@ -79,7 +79,11 @@ export function handleNewGauge(event: NewGauge): void { pool.preferentialGauge = liquidityGauge.id; pool.save(); - if (currentPreferentialGaugeId === null) return; + if ( + currentPreferentialGaugeId === null || + currentPreferentialGaugeId == liquidityGauge.id + ) + return; let currentPreferentialGauge = LiquidityGauge.load( currentPreferentialGaugeId, ) as LiquidityGauge;