Skip to content

Commit 2768be6

Browse files
committed
fix handling PREFERRED gauge
1 parent 1b9df4f commit 2768be6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/sweet-carpets-sleep.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'backend': patch
3+
---
4+
5+
fix handling PREFERRED gauge

modules/aprs/handlers/liquidity-gauge-apr/liquidity-gauge-apr-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class LiquidityGaugeAprHandler implements AprHandler {
3232

3333
for (const pool of pools) {
3434
const gauges = pool.staking.filter((s) => s.type === 'GAUGE').map((s) => s.gauge);
35-
const gauge = gauges.sort((a, b) => (a?.status === 'PREFERRED' ? -1 : 1))[0];
35+
const gauge = gauges.sort((a, b) => (a?.status === 'PREFERRED' ? -1 : 1))?.[0];
3636

3737
if (!gauge || !gauge.rewards || !pool.dynamicData || pool.dynamicData.totalShares === '0') {
3838
continue;

0 commit comments

Comments
 (0)