Skip to content

Commit 996ecb2

Browse files
fix(lite): improve filtering of capped campaigns / campaign with hooks (#95)
1 parent d5081e3 commit 996ecb2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

apps/lite/src/hooks/use-merkl-opportunities.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,9 @@ export function useMerklOpportunities({
7474
return;
7575
}
7676

77-
const reportedApr = opportunity.apr;
78-
const computedApr = (100 * (opportunity.dailyRewards * 365)) / opportunity.tvl;
79-
if (computedApr * 1.0001 < reportedApr) {
77+
if ("hooks" in campaign || "computeScoreParameters" in campaign) {
8078
console.warn(
81-
`Skipping opportunity ${opportunity.id} because reported APR doesn't apply to full deposit amount.`,
79+
`Skipping opportunity ${opportunity.id} (campaign ${campaignId}) because it has hooks or computeScoreParameters.`,
8280
opportunity,
8381
);
8482
return;

0 commit comments

Comments
 (0)