@merkl/api 0.10.383 → 0.10.385
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.
@@ -581,10 +581,10 @@ export const extractOpportunities = {
|
|
581
581
|
id: `${Campaign.COMPOUND}_${campaign.mainParameter}`,
|
582
582
|
platform: CompFork[campaign.campaignParameters.compFork],
|
583
583
|
name: [
|
584
|
-
CompFork[campaign.campaignParameters.compFork],
|
585
584
|
params.subCampaignType === CompoundSubCampaignType.supply
|
586
|
-
? `Supply ${params.
|
587
|
-
: `Borrow ${params.
|
585
|
+
? `Supply ${params.symbolUnderlyingToken} on`
|
586
|
+
: `Borrow ${params.symbolUnderlyingToken} on`,
|
587
|
+
CompFork[params.compFork],
|
588
588
|
].join(" "),
|
589
589
|
chainId: !computeChainId ? chainId : computeChainId,
|
590
590
|
distributionChainId: chainId,
|
@@ -599,18 +599,19 @@ export async function CLAMMDynamicData(chainId, campaigns) {
|
|
599
599
|
blacklistedBalance1 = poolBalanceToken1;
|
600
600
|
blacklistedLiquidity = poolTotalLiquidity;
|
601
601
|
// Get all beefy staker is whitelisted, get a list of all senders
|
602
|
-
|
602
|
+
const beefyStakerCount = almDetails.filter(a => a.type === ALM.BeefyStaker).length;
|
603
|
+
const beefyCount = almDetails.filter(a => a.type === ALM.Beefy).length;
|
604
|
+
if (c.campaignParameters.whitelist.length === beefyStakerCount + beefyCount ||
|
605
|
+
c.campaignParameters.whitelist.length === beefyStakerCount) {
|
603
606
|
let targetToMatch = "";
|
604
607
|
for (const alm of almDetails.filter(a => a.type === ALM.BeefyStaker)) {
|
605
608
|
if (alm.sender === c.campaignParameters.whitelist[0]) {
|
606
609
|
targetToMatch = alm.target;
|
607
610
|
}
|
608
611
|
}
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
c.campaignParameters.whitelist.push(alm.owner);
|
613
|
-
}
|
612
|
+
for (const alm of almDetails.filter(a => a.type === ALM.Beefy)) {
|
613
|
+
if (targetToMatch === alm.sender.toLowerCase()) {
|
614
|
+
c.campaignParameters.whitelist.push(alm.owner);
|
614
615
|
}
|
615
616
|
}
|
616
617
|
}
|
@@ -13,6 +13,6 @@ export const getCompoundMetadata = (chainId, campaignSubType, params) => {
|
|
13
13
|
{ chainId, address: params.underlyingToken },
|
14
14
|
{ chainId, address: params.targetToken },
|
15
15
|
],
|
16
|
-
mainProtocol:
|
16
|
+
mainProtocol: CompFork[params.compFork].toLowerCase(),
|
17
17
|
};
|
18
18
|
};
|