@1delta/margin-fetcher 0.0.288 → 0.0.302

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
@@ -38370,7 +38370,7 @@ async function isEulerEarnSubgraphStale(chainId, subgraphUrl) {
38370
38370
  fetchSubgraphHead(subgraphUrl),
38371
38371
  getEvmClientUniversal({ chain: chainId, rpcId: 0 }).getBlockNumber().then((b) => Number(b)).catch(() => null)
38372
38372
  ]);
38373
- if (subHead == null || chainHead == null) return false;
38373
+ if (subHead == null || chainHead == null) return true;
38374
38374
  const lagBlocks = chainHead - subHead;
38375
38375
  if (lagBlocks <= 0) return false;
38376
38376
  const lagSeconds = lagBlocks * (BLOCK_TIME_SEC[chainId] ?? DEFAULT_BLOCK_TIME_SEC);
@@ -45651,8 +45651,8 @@ function parseVault8(v, chainId, prices, tokenList) {
45651
45651
  );
45652
45652
  const base = num2(v.apy?.apy) ?? 0;
45653
45653
  const campaign = num2(v.apy?.campaignApy);
45654
- const supplyRate = base;
45655
- const rewardsRate = campaign ?? 0;
45654
+ const supplyRate = apyToAprPercent(base);
45655
+ const rewardsRate = campaign != null ? apyToAprPercent(campaign) : 0;
45656
45656
  const oracleKey = toOracleKey(assetMeta?.assetGroup) ?? toGenericPriceKey(assetAddr, chainId);
45657
45657
  const apiTvlUsd = num2(v.latest_reported_tvl) ?? 0;
45658
45658
  const impliedPriceUsd = totalAssetsFormatted > 0 ? apiTvlUsd / totalAssetsFormatted : 0;