Skip to content

Commit b7eca0c

Browse files
authored
Merge pull request #2431 from balancer/v3-canary
publish to prod
2 parents 315428c + ad44b47 commit b7eca0c

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# backend
22

3+
## 1.56.6
4+
5+
### Patch Changes
6+
7+
- 1b9df4f: fix handling preferred gauge APRs
8+
- 2768be6: fix handling PREFERRED gauge
9+
310
## 1.56.5
411

512
### Patch Changes

modules/aprs/examples/integration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { AprService } from '../';
22
import { Chain } from '@prisma/client';
33

44
async function calculationExample(
5-
chain: Chain = 'MAINNET',
6-
poolId = '0x3de27efa2f1aa663ae5d458857e731c129069f29000200000000000000000588',
5+
chain: Chain = 'POLYGON',
6+
poolId = '0xe2f706ef1f7240b803aae877c9c762644bb808d80002000000000000000008c2',
77
) {
88
const service = new AprService();
99

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ export class LiquidityGaugeAprHandler implements AprHandler {
3131
const aprItems: Omit<PrismaPoolAprItem, 'createdAt' | 'updatedAt'>[] = [];
3232

3333
for (const pool of pools) {
34-
const gauge = pool.staking.find((s) => s.type === 'GAUGE')?.gauge;
34+
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];
3536

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "backend",
3-
"version": "1.56.5",
3+
"version": "1.56.6",
44
"description": "Backend service for Beethoven X and Balancer",
55
"repository": "https://github.com/balancer/backend",
66
"author": "Beethoven X",

0 commit comments

Comments
 (0)