@merkl/api 0.19.19 → 0.19.21
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.
@@ -137,9 +137,18 @@ export class Erc20DynamicData {
|
|
137
137
|
field: "averageBoost",
|
138
138
|
}))?.averageBoost ?? 1;
|
139
139
|
}
|
140
|
+
const forfeitingBoost = 1;
|
141
|
+
if (!!campaign.campaignParameters.hooks?.length) {
|
142
|
+
lastEligibilityRatio =
|
143
|
+
(await ComputedValueService.findCampaignValue({
|
144
|
+
campaignId: `${campaign.campaignId}-${chainId}`,
|
145
|
+
field: "forfeitingBoost",
|
146
|
+
}))?.forfeitingBoost ?? 1;
|
147
|
+
}
|
140
148
|
dynamicData.push({
|
141
149
|
...campaign,
|
142
150
|
apr: (lastEligibilityRatio *
|
151
|
+
forfeitingBoost *
|
143
152
|
(priceRewardToken *
|
144
153
|
BN2Number(campaign.amount, campaign.campaignParameters.decimalsRewardToken) *
|
145
154
|
YEAR *
|
@@ -67,7 +67,7 @@ export class ClammMetadata {
|
|
67
67
|
}
|
68
68
|
// Protocol id normalization
|
69
69
|
let mainProtocol = AMM[params.amm]
|
70
|
-
? camelToKebabCase(AMM[params.amm].replace(/\/?(V\d+)/g, "").replaceAll("Algebra", ""))
|
70
|
+
? camelToKebabCase(AMM[params.amm].replace(/\/?(V(\d+_)?\d+)/g, "").replaceAll("Algebra", ""))
|
71
71
|
: undefined;
|
72
72
|
if (mainProtocol?.includes("stryke"))
|
73
73
|
mainProtocol = "stryke";
|