@1delta/margin-fetcher 0.0.115 → 0.0.116
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
|
@@ -8274,7 +8274,7 @@ var getAaveV2ReservesDataConverter = (lender, chainId, prices, additionalYields,
|
|
|
8274
8274
|
);
|
|
8275
8275
|
const totalAToken = liquidity + Number(totalStableDebt) + Number(totalVariableDebt);
|
|
8276
8276
|
const oracleKey = toOracleKey(assetMeta?.assetGroup) ?? toGenericPriceKey(asset, chainId);
|
|
8277
|
-
const price = prices[oracleKey] ??
|
|
8277
|
+
const price = prices[oracleKey] ?? 0;
|
|
8278
8278
|
const totalDepositsUSD = Number(totalAToken) * price;
|
|
8279
8279
|
const totalDebtUSD = Number(totalVariableDebt) * price;
|
|
8280
8280
|
resultReserves[asset] = {
|
|
@@ -8418,7 +8418,7 @@ var getAaveV3ReservesDataConverter = (lender, chainId, prices, additionalYields,
|
|
|
8418
8418
|
decimals
|
|
8419
8419
|
);
|
|
8420
8420
|
const liquidity = Number(totalDeposits) - Number(totalDebt) - Number(totalDebtStable);
|
|
8421
|
-
const price = prices[toOracleKey(assetMeta?.assetGroup) ?? toGenericPriceKey(asset, chainId)];
|
|
8421
|
+
const price = prices[toOracleKey(assetMeta?.assetGroup) ?? toGenericPriceKey(asset, chainId)] ?? 0;
|
|
8422
8422
|
resultReserves[asset] = {
|
|
8423
8423
|
poolId: asset,
|
|
8424
8424
|
underlying: asset,
|
|
@@ -8594,7 +8594,7 @@ function parseYLDRCall(chainId, lender, additionalYields, prices, tokenList) {
|
|
|
8594
8594
|
);
|
|
8595
8595
|
const liquidity = Number(totalAToken) - Number(totalVariableDebt);
|
|
8596
8596
|
const oracleKey = toOracleKey(assetMeta?.assetGroup) ?? toGenericPriceKey(asset, chainId);
|
|
8597
|
-
const price = prices[oracleKey] ??
|
|
8597
|
+
const price = prices[oracleKey] ?? 0;
|
|
8598
8598
|
const totalDepositsUSD = Number(totalAToken) * price;
|
|
8599
8599
|
const totalDebtUSD = Number(totalVariableDebt) * price;
|
|
8600
8600
|
resultReserves[asset] = {
|
|
@@ -8715,7 +8715,7 @@ function parseAave32(chainId, lender, prices, additionalYields, tokenList) {
|
|
|
8715
8715
|
decimals
|
|
8716
8716
|
);
|
|
8717
8717
|
const liquidity = Number(totalDeposits) - Number(totalDebt) - Number(totalDebtStable);
|
|
8718
|
-
const price = prices[toOracleKey(assetMeta?.assetGroup)
|
|
8718
|
+
const price = prices[toOracleKey(assetMeta?.assetGroup) ?? toGenericPriceKey(asset, chainId)] ?? 0;
|
|
8719
8719
|
resultReserves[asset] = {
|
|
8720
8720
|
poolId: asset,
|
|
8721
8721
|
underlying: asset,
|
|
@@ -8928,7 +8928,7 @@ var getCompoundV3ReservesDataConverter = (lender, chainId, prices, additionalYie
|
|
|
8928
8928
|
const decimals2 = assetMeta?.decimals ?? 18;
|
|
8929
8929
|
const totals = parseRawAmount(resultsTotals[0], decimals2);
|
|
8930
8930
|
const oracleKey = toOracleKey(assetMeta?.assetGroup) ?? toGenericPriceKey(asset, chainId);
|
|
8931
|
-
const totalUsd = Number(totals) * (prices[oracleKey] ??
|
|
8931
|
+
const totalUsd = Number(totals) * (prices[oracleKey] ?? 0);
|
|
8932
8932
|
result[asset] = {
|
|
8933
8933
|
poolId: asset,
|
|
8934
8934
|
underlying: asset,
|
|
@@ -21900,6 +21900,8 @@ var fetchMainPrices = async (chainIds, rpcOverrides, lists = {}) => {
|
|
|
21900
21900
|
aaveForks = aaveForks?.filter((a) => a !== Lender.LORE);
|
|
21901
21901
|
if (chainId === Chain.BNB_SMART_CHAIN_MAINNET)
|
|
21902
21902
|
aaveForks = aaveForks?.filter((a) => a !== Lender.AVALON_USDX);
|
|
21903
|
+
if (chainId === Chain.MANTA_PACIFIC_MAINNET)
|
|
21904
|
+
aaveForks = aaveForks?.filter((a) => a !== Lender.ZEROLEND);
|
|
21903
21905
|
const reservesToQuery = aaveForks?.map((a) => ({
|
|
21904
21906
|
fork: a,
|
|
21905
21907
|
assets: getAaveAssets(chainId, a)
|