|
9 | 9 | } from "../../constants"; |
10 | 10 | import type { Asset } from "../../router"; |
11 | 11 | import type { SupportedToken } from "../../sdk-gov-legacy"; |
12 | | -import type { PartialRecord } from "../../utils"; |
13 | 12 | import { toBigInt } from "../../utils"; |
14 | 13 | import type { PoolData_Legacy } from "../core/pool"; |
15 | 14 | import type { TokenData } from "../tokens/tokenData"; |
@@ -69,7 +68,7 @@ interface GetPoolExtraLmAPYProps |
69 | 68 | interface GetCAExtraAPYProps { |
70 | 69 | assets: Array<Asset>; |
71 | 70 | supply: Record<Address, bigint> | Record<Address, Asset>; |
72 | | - rewardInfo: PartialRecord<SupportedToken, Array<FarmInfo>>; |
| 71 | + rewardInfo: Record<Address, Array<FarmInfo>>; |
73 | 72 | currentTimestamp: number; |
74 | 73 |
|
75 | 74 | prices: Record<Address, bigint>; |
@@ -195,10 +194,9 @@ export class GearboxRewardsApy { |
195 | 194 | }: GetCAExtraAPYProps): Array<ExtraRewardApy> { |
196 | 195 | const extra = assets.reduce((acc, asset) => { |
197 | 196 | const { token } = asset; |
198 | | - const { symbol } = restProps.tokensList[token] || {}; |
199 | | - const info = rewardInfo[symbol || ""]; |
| 197 | + const info = rewardInfo[token || ""]; |
200 | 198 |
|
201 | | - if (!info) return acc; |
| 199 | + if (!info || info.length === 0) return acc; |
202 | 200 |
|
203 | 201 | const extra = info.map(inf => |
204 | 202 | this.getCASingleExtraAPY_V3({ |
|
0 commit comments