Skip to content

Commit b685236

Browse files
authored
fix: blocked by not updated whitelist (#2954)
1 parent 838e627 commit b685236

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎src/hooks/useMerklIncentives.ts‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { ProtocolAction } from '@aave/contract-helpers';
2-
import { ReserveIncentiveResponse } from '@aave/math-utils/dist/esm/formatters/incentive/calculate-reserve-incentives';
2+
import type { ReserveIncentiveResponse } from '@aave/math-utils/dist/esm/formatters/incentive/calculate-reserve-incentives';
33
import { useQuery } from '@tanstack/react-query';
44
import { useRootStore } from 'src/store/root';
55
import { convertAprToApy } from 'src/utils/utils';
6-
import { Address, checksumAddress } from 'viem';
6+
import { type Address, checksumAddress } from 'viem';
77

88
enum OpportunityAction {
99
LEND = 'LEND',
@@ -146,6 +146,7 @@ type WhitelistApiResponse = {
146146
const MERKL_ENDPOINT =
147147
'https://api.merkl.xyz/v4/opportunities?mainProtocolId=aave&items=100&status=LIVE'; // Merkl API
148148
const WHITELIST_ENDPOINT = 'https://apps.aavechan.com/api/aave/merkl/whitelist-token-list'; // Endpoint to fetch whitelisted tokens
149+
const EXTRA_WHITELIST_TOKENS = ['0xE3190143Eb552456F88464662f0c0C4aC67A77eB'.toLowerCase()];
149150
const checkOpportunityAction = (
150151
opportunityAction: OpportunityAction,
151152
protocolAction: ProtocolAction
@@ -222,7 +223,10 @@ export const useMerklIncentives = ({
222223
}
223224

224225
const whitelistedTokensSet = new Set(
225-
whitelistData.whitelistedRewardTokens.map((token) => token.toLowerCase())
226+
[
227+
...whitelistData.whitelistedRewardTokens.map((token) => token.toLowerCase()),
228+
...EXTRA_WHITELIST_TOKENS,
229+
].filter(Boolean)
226230
);
227231

228232
const whitelistedOpportunities = validOpportunities.filter((opp) =>

0 commit comments

Comments
 (0)