Skip to content

Commit

Permalink
Merge pull request #95 from balancer/fix-pref-gauge
Browse files Browse the repository at this point in the history
fix preferential gauges
  • Loading branch information
mendesfabio authored Feb 19, 2024
2 parents 73e3c7b + 11142cc commit 455babc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gaugeController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 455babc

Please sign in to comment.