diff --git a/package.json b/package.json index 7fab9772..f883ae2c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@curvefi/api", - "version": "2.66.5", + "version": "2.66.6", "description": "JavaScript library for curve.fi", "main": "lib/index.js", "author": "Macket", diff --git a/src/dao.ts b/src/dao.ts index 41406279..357c6cfe 100644 --- a/src/dao.ts +++ b/src/dao.ts @@ -250,7 +250,8 @@ export const userGaugeVotes = async (address = ""): Promise<{ gauges: IGaugeUser const gaugeData = Object.values(await _getAllGauges()); const calls: any[] = [veMulticallContract.balanceOf(address)]; for (const d of gaugeData) { - calls.push(gcMulticallContract.vote_user_slopes(address, d.gauge)); + const gaugeAddress = d.rootGauge ? d.rootGauge : d.gauge; + calls.push(gcMulticallContract.vote_user_slopes(address, gaugeAddress)); } const [veCrvBalance, ...votes] = await curve.multicallProvider.all(calls) as [bigint, bigint[]]; diff --git a/src/interfaces.ts b/src/interfaces.ts index 8dda6f1f..a72c3d6a 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -193,6 +193,7 @@ export interface IProfit { export interface IGaugesDataFromApi { blockchainId: string; gauge: string, + rootGauge?: string, swap: string, swap_token: string, shortName: string,