@merkl/api 0.10.337 → 0.10.338

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,7 +1,7 @@
1
1
  import { CampaignTypeConfigResourceMapping, ChainId, NULL_ADDRESS, NULL_ROOT, buildCampaignPayload, encodeForwarderData, registry, } from "@sdk";
2
2
  import _ from "lodash";
3
3
  import { safeTemplate, } from "./programPayload.model";
4
- import { MerklInterfaceCampaigns, zkSyncCampaignAmounts } from "./programPayload.repository";
4
+ import { MerklInterfaceCampaigns } from "./programPayload.repository";
5
5
  export class ProgramPayloadService {
6
6
  // ─── ProgramPayload ──────────────────────────────────────────────────────────
7
7
  static buildConfigTemplate(params) {
@@ -123,11 +123,12 @@ export class ProgramPayloadService {
123
123
  }
124
124
  static buildProgramPayload(query) {
125
125
  let campaignPayloads = null;
126
+ query.amount = query.amount ? query.amount : "0";
126
127
  for (const campaign of Object.keys(MerklInterfaceCampaigns[query.program])) {
127
128
  const queryCampaign = {
128
129
  ...query,
129
130
  campaign,
130
- amount: query.amount || zkSyncCampaignAmounts[campaign],
131
+ amount: query.amount,
131
132
  };
132
133
  campaignPayloads = ProgramPayloadService.buildPayload(queryCampaign, campaignPayloads);
133
134
  }