From 96a44ff1fb3361ca6c856fb342ee38f624f31b43 Mon Sep 17 00:00:00 2001 From: fedorovdg Date: Fri, 10 Jan 2025 19:13:44 +0400 Subject: [PATCH 1/2] fix: fixed _getRewardsFromApi for lite --- src/interfaces.ts | 1 + src/utils.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/interfaces.ts b/src/interfaces.ts index 4c9730be..8dda6f1f 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -131,6 +131,7 @@ export interface IPoolDataFromApi { implementationAddress: string, coins: ICoinFromPoolDataApi[], gaugeRewards: IRewardFromApi[], + gaugeExtraRewards?: IRewardFromApi[], usdTotal: number, totalSupply: number, amplificationCoefficient: string, diff --git a/src/utils.ts b/src/utils.ts index 2de4ec47..371ed72f 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -414,7 +414,7 @@ export const _getRewardsFromApi = async (): Promise> => for (const extendedPoolData of allTypesExtendedPoolData) { for (const pool of extendedPoolData.poolData) { if (pool.gaugeAddress) { - rewardsDict[pool.gaugeAddress.toLowerCase()] = (pool.gaugeRewards ?? []) + rewardsDict[pool.gaugeAddress.toLowerCase()] = (pool.gaugeRewards ?? pool.gaugeExtraRewards ?? []) .filter((r) => curve.chainId === 1 || r.tokenAddress.toLowerCase() !== curve.constants.COINS.crv); } } From 6730c6b5c80a01c83e6fad05147a66df32ff9358 Mon Sep 17 00:00:00 2001 From: fedorovdg Date: Fri, 10 Jan 2025 19:14:37 +0400 Subject: [PATCH 2/2] build: v2.65.27 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 10f36025..4a4b7aa1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@curvefi/api", - "version": "2.65.26", + "version": "2.65.27", "description": "JavaScript library for curve.fi", "main": "lib/index.js", "author": "Macket",