@merkl/api 0.10.267 → 0.10.268

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.
@@ -446,7 +446,7 @@ export const extractOpportunities = {
446
446
  const opportunity = {
447
447
  id: `${Campaign.VEST}_${campaign.mainParameter}`,
448
448
  platform: "Vest supply",
449
- name: ["Vest supply treasury"].join(" "),
449
+ name: ["Supply USDC.e on Vest"].join(" "),
450
450
  chainId: !computeChainId ? chainId : computeChainId,
451
451
  distributionChainId: chainId,
452
452
  tvl,
@@ -36,6 +36,7 @@ export declare const campaignTypeToEnumMap: {
36
36
  readonly EIGENLAYER: any;
37
37
  readonly VEST: any;
38
38
  readonly ION: any;
39
+ readonly ERC20TRANSFERS: any;
39
40
  };
40
41
  export type ConvertedCampaignType<C extends CampaignType> = (typeof campaignTypeToEnumMap)[C];
41
42
  export declare const CampaignUniqueDto: import("@sinclair/typebox").TObject<{
@@ -23,6 +23,7 @@ export const campaignTypeToEnumMap = {
23
23
  EIGENLAYER: CampaignTypeEnum.EIGENLAYER,
24
24
  VEST: CampaignTypeEnum.VEST,
25
25
  ION: CampaignTypeEnum.ION,
26
+ ERC20TRANSFERS: CampaignTypeEnum.ERC20TRANSFERS,
26
27
  };
27
28
  // ─── DTOs ────────────────────────────────────────────────────────────────────
28
29
  export const CampaignUniqueDto = t.Object({
@@ -25,7 +25,7 @@ export class OpportunityRepository {
25
25
  DailyRewardsBreakdown: {
26
26
  where: {
27
27
  Campaign: {
28
- RewardToken: { isTest: withTest },
28
+ RewardToken: withTest ? undefined : { isTest: false },
29
29
  },
30
30
  },
31
31
  include: {
@@ -132,7 +132,9 @@ export class OpportunityRepository {
132
132
  Chain: true,
133
133
  MainProtocol: true,
134
134
  Protocols: true,
135
- Tokens: true,
135
+ Tokens: {
136
+ where: !withTest ? { isTest: false } : undefined,
137
+ },
136
138
  },
137
139
  where: { id },
138
140
  });
@@ -140,7 +142,7 @@ export class OpportunityRepository {
140
142
  static async findUniqueOrThrowWithCampaigns(id, withTest) {
141
143
  const b = await apiDbClient.opportunity.findUniqueOrThrow({
142
144
  include: {
143
- ...OpportunityRepository.#getRecordInclusion(),
145
+ ...OpportunityRepository.#getRecordInclusion(withTest),
144
146
  Chain: {
145
147
  include: {
146
148
  Explorer: true,
@@ -247,18 +249,18 @@ export class OpportunityRepository {
247
249
  const { page: _page, items: _items } = query;
248
250
  const page = _page ? _page : 0;
249
251
  const items = _items ? _items : 20;
250
- const test = query.test ?? false;
252
+ const withTest = query.test ?? false;
251
253
  const args = OpportunityRepository.#transformQueryToPrismaFilters(query);
252
254
  return await apiDbClient.opportunity.findMany({
253
255
  take: items,
254
256
  skip: page * items,
255
257
  include: {
256
- ...OpportunityRepository.#getRecordInclusion(test),
258
+ ...OpportunityRepository.#getRecordInclusion(withTest),
257
259
  MainProtocol: true,
258
260
  Chain: true,
259
261
  Protocols: true,
260
262
  Tokens: {
261
- where: !test ? { isTest: false } : undefined,
263
+ where: !withTest ? { isTest: false } : undefined,
262
264
  },
263
265
  },
264
266
  ...args,