@gearbox-protocol/sdk 13.6.0-apy-plugin.3 → 13.6.0-apy-plugin.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -148,8 +148,9 @@ class ApyPlugin extends import_sdk.BasePlugin {
148
148
  for (const market of markets) {
149
149
  const pool = market.pool.pool;
150
150
  const poolAddr = pool.address.toLowerCase();
151
+ const underlyingLc = pool.underlying.toLowerCase();
151
152
  const depositAPY = (0, import_formatter.rayToNumber)(pool.supplyRate) * Number(import_sdk.PERCENTAGE_DECIMALS);
152
- const underlyingAPY = apy.apyList?.[pool.underlying] ?? 0;
153
+ const underlyingAPY = apy.apyList?.[underlyingLc] ?? apy.apyList?.[pool.underlying] ?? 0;
153
154
  const lookupAddresses = this.#getExtraAPYLookupAddresses(poolAddr);
154
155
  const extraAPY = (0, import_pool_apy_utils.getPoolExtraAPY)(lookupAddresses, apy.poolExtraAPYList);
155
156
  const currentExternalList = apy.poolExternalAPYList?.[poolAddr];
@@ -138,8 +138,9 @@ class ApyPlugin extends BasePlugin {
138
138
  for (const market of markets) {
139
139
  const pool = market.pool.pool;
140
140
  const poolAddr = pool.address.toLowerCase();
141
+ const underlyingLc = pool.underlying.toLowerCase();
141
142
  const depositAPY = rayToNumber(pool.supplyRate) * Number(PERCENTAGE_DECIMALS);
142
- const underlyingAPY = apy.apyList?.[pool.underlying] ?? 0;
143
+ const underlyingAPY = apy.apyList?.[underlyingLc] ?? apy.apyList?.[pool.underlying] ?? 0;
143
144
  const lookupAddresses = this.#getExtraAPYLookupAddresses(poolAddr);
144
145
  const extraAPY = getPoolExtraAPY(lookupAddresses, apy.poolExtraAPYList);
145
146
  const currentExternalList = apy.poolExternalAPYList?.[poolAddr];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "13.6.0-apy-plugin.3",
3
+ "version": "13.6.0-apy-plugin.4",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",