@1delta/margin-fetcher 0.0.60 → 0.0.61
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 +18 -9
- package/dist/index.js.map +1 -1
- package/dist/lending/fetchLender.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -11846,6 +11846,7 @@ var getLenderPublicData = async (chainId, lenders, prices, additionalYields, mul
|
|
|
11846
11846
|
),
|
|
11847
11847
|
await tokenList()
|
|
11848
11848
|
]);
|
|
11849
|
+
const invalidLenders = [];
|
|
11849
11850
|
let lenderData = {};
|
|
11850
11851
|
let currentSlice = 0;
|
|
11851
11852
|
for (const lender of lenders) {
|
|
@@ -11857,16 +11858,24 @@ var getLenderPublicData = async (chainId, lenders, prices, additionalYields, mul
|
|
|
11857
11858
|
list
|
|
11858
11859
|
);
|
|
11859
11860
|
if (sliceLength > 0) {
|
|
11860
|
-
|
|
11861
|
-
|
|
11862
|
-
|
|
11863
|
-
if (
|
|
11864
|
-
|
|
11865
|
-
|
|
11866
|
-
|
|
11867
|
-
|
|
11868
|
-
|
|
11861
|
+
try {
|
|
11862
|
+
const data = rawResults.slice(currentSlice, currentSlice + sliceLength);
|
|
11863
|
+
const convertedData = converter(data);
|
|
11864
|
+
if (isMultiMarket(lender)) {
|
|
11865
|
+
if (!convertedData) {
|
|
11866
|
+
invalidLenders.push(lender);
|
|
11867
|
+
} else {
|
|
11868
|
+
lenderData = { ...lenderData, ...convertedData };
|
|
11869
|
+
}
|
|
11870
|
+
} else {
|
|
11871
|
+
if (!convertedData) {
|
|
11872
|
+
invalidLenders.push(lender);
|
|
11873
|
+
} else {
|
|
11874
|
+
lenderData[lender] = convertedData;
|
|
11875
|
+
}
|
|
11869
11876
|
}
|
|
11877
|
+
} catch {
|
|
11878
|
+
console.log("error for chain/lender", chainId, lender);
|
|
11870
11879
|
}
|
|
11871
11880
|
currentSlice += sliceLength;
|
|
11872
11881
|
}
|