From 71798584f81e85ab6541eab9abed7bec21dc8d17 Mon Sep 17 00:00:00 2001 From: Sam Mason de Caires Date: Wed, 21 Oct 2026 16:21:42 +0100 Subject: [PATCH] feat: link merkl tooltip learn more to merkl campaign page Co-Authored-By: Claude Opus 5.5 --- .../MerklIncentivesTooltipContent.tsx | 24 +++++-------------- src/hooks/useMerklIncentives.ts | 3 +++ 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/src/components/incentives/MerklIncentivesTooltipContent.tsx b/src/components/incentives/MerklIncentivesTooltipContent.tsx index 5f05c6a8f8..4c8b88f174 100644 --- a/src/components/incentives/MerklIncentivesTooltipContent.tsx +++ b/src/components/incentives/MerklIncentivesTooltipContent.tsx @@ -28,6 +28,10 @@ export const MerklIncentivesTooltipContent = ({ merklIncentives.onChainCampaignId?.toLowerCase() ) : undefined; + const learnMoreLink = + merklIncentives.customForumLink ?? + merklIncentives.merklOpportunityUrl ?? + 'https://governance.aave.com/t/arfc-set-aci-as-emission-manager-for-liquidity-mining-programs/17898'; return ( {merklIncentives.customMessage}{' '} - + Learn more ) : ( {merklIncentives.description}{' '} - + Learn more diff --git a/src/hooks/useMerklIncentives.ts b/src/hooks/useMerklIncentives.ts index 1283563faa..649a6c8831 100644 --- a/src/hooks/useMerklIncentives.ts +++ b/src/hooks/useMerklIncentives.ts @@ -98,6 +98,7 @@ export type ExtendedReserveIncentiveResponse = ReserveIncentiveResponse & ReserveIncentiveAdditionalData & { breakdown: MerklIncentivesBreakdown; description?: string; + merklOpportunityUrl?: string; isSelf?: boolean; rewardsTokensMappedApys?: { token: { @@ -145,6 +146,7 @@ export type MerklIncentivesBreakdown = { const MERKL_ENDPOINT = 'https://api.merkl.xyz/v4/opportunities?mainProtocolId=aave&items=100&status=LIVE'; // Merkl API +const MERKL_OPPORTUNITY_URL = 'https://app.merkl.xyz/opportunities'; const AAVE_NET_APR_DISTRIBUTION_TYPE = 'AAVE_NET_APR'; const convertApyToApr = (apy: number) => 12 * ((1 + apy) ** (1 / 12) - 1); @@ -328,6 +330,7 @@ export const useMerklIncentives = ({ rewardTokenAddress: rewardToken.address, rewardTokenSymbol: rewardToken.symbol, description: description, + merklOpportunityUrl: `${MERKL_OPPORTUNITY_URL}/${primaryOpportunity.id}`, ...incentiveAdditionalData, isSelf, rewardsTokensMappedApys,