@1delta/margin-fetcher 0.0.96 → 0.0.97
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 +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18484,7 +18484,8 @@ var getCompoundV2UserDataConverter = (lender, chainId, account, prices, pricesHi
|
|
|
18484
18484
|
function createCompoundV2Entry(i, data, assetsIn, vToken, asset, prices, pricesHist, claimableRewards) {
|
|
18485
18485
|
const depositsRaw = data[2 * i].toString();
|
|
18486
18486
|
const borrowsRaw = data[2 * i + 1].toString();
|
|
18487
|
-
|
|
18487
|
+
const collateralEnabled = Boolean(assetsIn?.includes(vToken));
|
|
18488
|
+
if (!collateralEnabled && depositsRaw === "0" && borrowsRaw === "0") {
|
|
18488
18489
|
return {
|
|
18489
18490
|
dataForAsset: void 0,
|
|
18490
18491
|
addedDeposits: 0,
|
|
@@ -18508,7 +18509,7 @@ function createCompoundV2Entry(i, data, assetsIn, vToken, asset, prices, pricesH
|
|
|
18508
18509
|
depositsUSD: currentATokenBalance * price,
|
|
18509
18510
|
debtStableUSD: 0,
|
|
18510
18511
|
debtUSD: currentVariableDebt * price,
|
|
18511
|
-
collateralEnabled
|
|
18512
|
+
collateralEnabled,
|
|
18512
18513
|
claimableRewards
|
|
18513
18514
|
};
|
|
18514
18515
|
return {
|