@1delta/margin-fetcher 0.0.160 → 0.0.162

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.
package/dist/index.js CHANGED
@@ -12418,7 +12418,7 @@ var VENUS_LENS = {
12418
12418
  };
12419
12419
  var SUMER_LENS = {
12420
12420
  [Chain.BNB_SMART_CHAIN_MAINNET]: "0xB7ea94340e65CC68d1274aE483dfBE593fD6f21e",
12421
- // [Chain.ETHEREUM_MAINNET]: '',
12421
+ [Chain.ETHEREUM_MAINNET]: "0x3375B2EF9C4D2c6434d39BBE5234c5101218500d",
12422
12422
  [Chain.ARBITRUM_ONE]: "0xbdBCf25E9187350b9102E316b707B1B2c7E51492",
12423
12423
  [Chain.BASE]: "0x2B43fBb7D1171bCfA31c9685f24A417dC8757064",
12424
12424
  [Chain.BERACHAIN]: "0x85D682FA4115f6a1Ed91170E705A50D532e3B6BD",
@@ -13262,7 +13262,16 @@ function convertSingleEntry(opts) {
13262
13262
  };
13263
13263
  }
13264
13264
  function convertSumerEntry(opts) {
13265
- const { entryRaw, asset, chainId, lender, prices, additionalYields, cToken, groups } = opts;
13265
+ const {
13266
+ entryRaw,
13267
+ asset,
13268
+ chainId,
13269
+ lender,
13270
+ prices,
13271
+ additionalYields,
13272
+ cToken,
13273
+ groups
13274
+ } = opts;
13266
13275
  const decs = asset.decimals;
13267
13276
  const currentEntry = readSumerCTokenMetadata(entryRaw, asset);
13268
13277
  const exchangeRateRaw = currentEntry.exchangeRateCurrent ?? 0n;
@@ -13282,10 +13291,16 @@ function convertSumerEntry(opts) {
13282
13291
  const marketUid = createMarketUid(chainId, lender, cToken);
13283
13292
  const groupId = currentEntry.groupId;
13284
13293
  const intraRate = Number(
13285
- parseRawAmount(currentEntry.intraRate?.toString(), RESERVE_MANTISSA_DECIMALS)
13294
+ parseRawAmount(
13295
+ currentEntry.intraRate?.toString(),
13296
+ RESERVE_MANTISSA_DECIMALS
13297
+ )
13286
13298
  );
13287
13299
  const interRate = Number(
13288
- parseRawAmount(currentEntry.interRate?.toString(), RESERVE_MANTISSA_DECIMALS)
13300
+ parseRawAmount(
13301
+ currentEntry.interRate?.toString(),
13302
+ RESERVE_MANTISSA_DECIMALS
13303
+ )
13289
13304
  );
13290
13305
  const config = {};
13291
13306
  for (let gId = 0; gId < SUMER_GROUP_COUNT; gId++) {
@@ -13355,6 +13370,7 @@ var getCompoundV2DataConverter = (lender, chainId, prices, additionalYields, tok
13355
13370
  if (!cToken || !underlying) continue;
13356
13371
  const poolId = underlying;
13357
13372
  const asset = tokenList[poolId];
13373
+ if (!asset) continue;
13358
13374
  const entryRaw = data[i];
13359
13375
  out.data[poolId] = convertSumerEntry({
13360
13376
  entryRaw,