@merkl/api 0.10.384 → 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.
@@ -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
|
}
|