@merkl/api 0.20.153 → 0.20.154

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.
@@ -1,4 +1,4 @@
1
- import { type CampaignParameters, Campaign as CampaignType, type ChainId, type MerklChainId } from "@sdk";
1
+ import { type CampaignParameters, Campaign as CampaignType, ChainId, type MerklChainId } from "@sdk";
2
2
  export declare class DynamicDataService {
3
3
  /**
4
4
  * @notice Updates all records for opportunities associated to the given campaigns
@@ -14,7 +14,7 @@ import bigintToString from "@/utils/bigintToString";
14
14
  import { log } from "@/utils/logger";
15
15
  import { parseDistributionType } from "@/utils/parseDistributionType";
16
16
  import { AprType, DistributionType } from "@db/api";
17
- import { Campaign as CampaignType, DAY, HOUR, NETWORK_LABELS, bigIntToNumber, } from "@sdk";
17
+ import { Campaign as CampaignType, ChainId, DAY, HOUR, NETWORK_LABELS, bigIntToNumber, } from "@sdk";
18
18
  import moment from "moment";
19
19
  export class DynamicDataService {
20
20
  /**
@@ -182,7 +182,8 @@ export class DynamicDataService {
182
182
  if (!dryRun) {
183
183
  for (const update of updates) {
184
184
  try {
185
- if (await DynamicDataService.checkValidUpdate(update.opportunityId, update.apr.cumulated)) {
185
+ if (chainId !== ChainId.ETHERLINK ||
186
+ (await DynamicDataService.checkValidUpdate(update.opportunityId, update.apr.cumulated))) {
186
187
  await OpportunityRepository.updateDynamicData(update.opportunityId, update.apr, update.tvl, update.dailyRewards);
187
188
  }
188
189
  }