Skip to content

Commit

Permalink
Merge pull request #439 from curvefi/fix/fix-lite-dao
Browse files Browse the repository at this point in the history
fix: fixed _getRewardsFromApi for lite
  • Loading branch information
OnlyJousting authored Jan 10, 2025
2 parents f950f8c + 6730c6b commit 7fd7154
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export interface IPoolDataFromApi {
implementationAddress: string,
coins: ICoinFromPoolDataApi[],
gaugeRewards: IRewardFromApi[],
gaugeExtraRewards?: IRewardFromApi[],
usdTotal: number,
totalSupply: number,
amplificationCoefficient: string,
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ export const _getRewardsFromApi = async (): Promise<IDict<IRewardFromApi[]>> =>
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);
}
}
Expand Down

0 comments on commit 7fd7154

Please sign in to comment.