@merkl/api 0.20.124 → 0.20.125
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.
@@ -51,7 +51,6 @@ export class Erc20TVLBuilder {
|
|
51
51
|
const result = await ChainInteractionService(computeChainId).fetchState(calls);
|
52
52
|
let index = 0;
|
53
53
|
for (const [i, { campaign }] of subTypeTVLs.entries()) {
|
54
|
-
log.local(`building TVLs for subtype ${subType} using deprecated code`);
|
55
54
|
const { campaignParameters } = campaign;
|
56
55
|
const { whitelist, blacklist } = campaignParameters;
|
57
56
|
if (whitelist?.length > 0) {
|
@@ -74,12 +73,14 @@ export class Erc20TVLBuilder {
|
|
74
73
|
tvls = tvls.concat(subTypeTVLs);
|
75
74
|
}
|
76
75
|
else {
|
76
|
+
log.local(`building TVLs for subtype ${subType} using deprecated code`);
|
77
77
|
// @deprecated In case we don't have the new builder, use the old erc20 dynamic data
|
78
78
|
const dynamicDataList = await new Erc20DynamicData().build(computeChainId, campaignsOfSubType);
|
79
79
|
if (dynamicDataList.length !== campaignsOfSubType.length) {
|
80
80
|
throw new Error("Erc20TVLBuilder: dynamicDataList.length !== campaignsOfSubType.length");
|
81
81
|
}
|
82
82
|
for (const [index, dynamicData] of dynamicDataList.entries()) {
|
83
|
+
console.log(dynamicData);
|
83
84
|
tvls.push({
|
84
85
|
campaign: campaignsOfSubType[index],
|
85
86
|
tvl: dynamicData.tvl,
|
@@ -207,40 +207,6 @@ export default class PriceService {
|
|
207
207
|
catch (error) {
|
208
208
|
log.error("❌ call to fetch camelot api price failed", error);
|
209
209
|
}
|
210
|
-
/** Retro API price completion */
|
211
|
-
try {
|
212
|
-
await axios
|
213
|
-
.get("https://retro-backend.stabl.finance/api/v1/assets")
|
214
|
-
.then(res => {
|
215
|
-
if (res.data.success) {
|
216
|
-
for (const x of res.data.data) {
|
217
|
-
if (this._prices[x.symbol] === undefined || this._prices[x.symbol] === null) {
|
218
|
-
this._prices[x.symbol] = x.price;
|
219
|
-
}
|
220
|
-
}
|
221
|
-
}
|
222
|
-
});
|
223
|
-
}
|
224
|
-
catch (error) {
|
225
|
-
log.error("❌ call to fetch retro api price failed", error);
|
226
|
-
}
|
227
|
-
/** Blueprint API price completion */
|
228
|
-
try {
|
229
|
-
await axios
|
230
|
-
.get("https://blue-backend.stabl.finance/api/v1/assets")
|
231
|
-
.then(res => {
|
232
|
-
if (res.data.success) {
|
233
|
-
for (const x of res.data.data) {
|
234
|
-
if (this._prices[x.symbol] === undefined || this._prices[x.symbol] === null) {
|
235
|
-
this._prices[x.symbol] = x.price;
|
236
|
-
}
|
237
|
-
}
|
238
|
-
}
|
239
|
-
});
|
240
|
-
}
|
241
|
-
catch (error) {
|
242
|
-
log.error("❌ call to fetch blueprint api price failed", error);
|
243
|
-
}
|
244
210
|
/** Flux price completion */
|
245
211
|
promises.push((async () => {
|
246
212
|
try {
|