@merkl/api 0.19.23 → 0.19.24
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.
@@ -5,26 +5,6 @@ import { ProtocolRepository } from "./protocol.repository";
|
|
5
5
|
// ─── Protocols Services ──────────────────────────────────────────────────────
|
6
6
|
export class ProtocolService {
|
7
7
|
static async findMany(query) {
|
8
|
-
await ProtocolRepository.changeId("uniswap-v3", "uniswap");
|
9
|
-
await ProtocolRepository.changeId("uniswap-v3", "uniswap");
|
10
|
-
await ProtocolRepository.changeId("balancerpool", "balancer");
|
11
|
-
await ProtocolRepository.changeId("syncswap-v3", "syncswap");
|
12
|
-
await ProtocolRepository.changeId("akronv2", "akron");
|
13
|
-
await ProtocolRepository.changeId("aerodromev2", "aerodrome");
|
14
|
-
await ProtocolRepository.changeId("velodromev2", "velodrome");
|
15
|
-
await ProtocolRepository.changeId("fenixv2", "fenix");
|
16
|
-
await ProtocolRepository.changeId("supswap-v3", "supswap");
|
17
|
-
await ProtocolRepository.changeId("stryke-sushi", "stryke");
|
18
|
-
await ProtocolRepository.changeId("stryke-pcs", "stryke");
|
19
|
-
await ProtocolRepository.changeId("quickswap-algebra-v1_2", "quickswap");
|
20
|
-
await ProtocolRepository.changeId("quickswap-uni", "quickswap");
|
21
|
-
await ProtocolRepository.changeId("quickswap-algebra", "quickswap");
|
22
|
-
await ProtocolRepository.changeId("quickswap-2", "quickswap");
|
23
|
-
await ProtocolRepository.changeId("pancake-swap-v3", "pancakeswap");
|
24
|
-
await ProtocolRepository.changeId("baseswapv2", "base-swap");
|
25
|
-
await ProtocolRepository.changeId("baseswap", "base-swap");
|
26
|
-
await ProtocolRepository.changeId("sushi-swap-v3", "sushi-swap");
|
27
|
-
await ProtocolRepository.changeId("sushiswap", "sushi-swap");
|
28
8
|
const protocols = await ProtocolRepository.findMany(query);
|
29
9
|
const enrichedProtocols = protocols.map(({ MainOpportunities, ...protocol }) => ({
|
30
10
|
...protocol,
|
@@ -101,7 +101,13 @@ export class StatusService {
|
|
101
101
|
const delayedCampaignResult = delayedCampaignArray[index];
|
102
102
|
const liveCampaignResult = liveCampaignArray[index];
|
103
103
|
const delayedCampaigns = delayedCampaignResult.status === "rejected" ? [] : delayedCampaignResult.value;
|
104
|
+
if (delayedCampaignResult.status === "rejected") {
|
105
|
+
log.warn(`delayed campaigns fetching failed on ${NETWORK_LABELS[chainId]}: ${delayedCampaignResult.reason}`);
|
106
|
+
}
|
104
107
|
const liveCampaigns = liveCampaignResult.status === "rejected" ? 0 : liveCampaignResult.value;
|
108
|
+
if (liveCampaignResult.status === "rejected") {
|
109
|
+
log.warn(`live campaigns fetching failed on ${NETWORK_LABELS[chainId]}: ${liveCampaignResult.reason}`);
|
110
|
+
}
|
105
111
|
if (!registry(chainId)?.Merkl?.DistributionCreator || !registry(chainId)?.Merkl?.Distributor) {
|
106
112
|
log.warn(`Missing registry for ${NETWORK_LABELS[chainId]}`);
|
107
113
|
continue;
|