@defisaver/positions-sdk 2.1.46-aave-dev → 2.1.46-aave-v3-6-dev
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/cjs/aaveV3/index.js +26 -13
- package/cjs/config/contracts.d.ts +8395 -2636
- package/cjs/config/contracts.js +39 -14
- package/cjs/contracts.d.ts +5267 -255
- package/cjs/helpers/aaveHelpers/index.js +5 -1
- package/cjs/spark/index.js +1 -0
- package/cjs/types/aave.d.ts +2 -0
- package/esm/aaveV3/index.js +26 -13
- package/esm/config/contracts.d.ts +8395 -2636
- package/esm/config/contracts.js +39 -14
- package/esm/contracts.d.ts +5267 -255
- package/esm/helpers/aaveHelpers/index.js +5 -1
- package/esm/spark/index.js +1 -0
- package/esm/types/aave.d.ts +2 -0
- package/package.json +1 -1
- package/src/aaveV3/index.ts +23 -13
- package/src/config/contracts.ts +39 -14
- package/src/helpers/aaveHelpers/index.ts +5 -1
- package/src/spark/index.ts +1 -0
- package/src/types/aave.ts +2 -0
|
@@ -60,7 +60,9 @@ export const aaveAnyGetEmodeMutableProps = (
|
|
|
60
60
|
const asset = getNativeAssetFromWrapped(_asset);
|
|
61
61
|
|
|
62
62
|
const assetData = assetsData[asset];
|
|
63
|
-
const eModeCategoryData: { collateralAssets: string[], collateralFactor: string, liquidationRatio: string } = eModeCategoriesData?.[eModeCategory] || {
|
|
63
|
+
const eModeCategoryData: { collateralAssets: string[], collateralFactor: string, liquidationRatio: string, ltvZeroAssets: string[] } = eModeCategoriesData?.[eModeCategory] || {
|
|
64
|
+
collateralAssets: [], ltvZeroAssets: [], collateralFactor: '0', liquidationRatio: '0',
|
|
65
|
+
};
|
|
64
66
|
|
|
65
67
|
if (
|
|
66
68
|
eModeCategory === 0
|
|
@@ -70,6 +72,8 @@ export const aaveAnyGetEmodeMutableProps = (
|
|
|
70
72
|
const { liquidationRatio, collateralFactor } = assetData;
|
|
71
73
|
return ({ liquidationRatio, collateralFactor });
|
|
72
74
|
}
|
|
75
|
+
if (eModeCategoryData.ltvZeroAssets.includes(asset)) return ({ liquidationRatio: '0', collateralFactor: '0' });
|
|
76
|
+
|
|
73
77
|
const { liquidationRatio, collateralFactor } = eModeCategoryData;
|
|
74
78
|
return ({ liquidationRatio, collateralFactor });
|
|
75
79
|
};
|
package/src/spark/index.ts
CHANGED
|
@@ -107,6 +107,7 @@ export const _getSparkMarketsData = async (provider: Client, network: NetworkNum
|
|
|
107
107
|
collateralFactor: new Dec(market.ltv).div(10000).toString(),
|
|
108
108
|
collateralAssets: eModeCategoriesData[emodeCategoryId] ? [...eModeCategoriesData[emodeCategoryId].collateralAssets, selectedMarket.assets[i]] : [selectedMarket.assets[i]],
|
|
109
109
|
borrowAssets: eModeCategoriesData[emodeCategoryId] ? [...eModeCategoriesData[emodeCategoryId].borrowAssets, selectedMarket.assets[i]] : [selectedMarket.assets[i]],
|
|
110
|
+
ltvZeroAssets: [],
|
|
110
111
|
};
|
|
111
112
|
|
|
112
113
|
return ({
|
package/src/types/aave.ts
CHANGED
|
@@ -45,6 +45,8 @@ export interface EModeCategoryData {
|
|
|
45
45
|
collateralBitmap?: string,
|
|
46
46
|
collateralAssets: string[],
|
|
47
47
|
borrowAssets: string[],
|
|
48
|
+
ltvzeroBitmap?: string,
|
|
49
|
+
ltvZeroAssets: string[],
|
|
48
50
|
}
|
|
49
51
|
export interface EModeCategoryDataMapping {
|
|
50
52
|
enteringTerms: boolean[],
|