diff --git a/packages/nextjs/hooks/token/types.ts b/packages/nextjs/hooks/token/types.ts index 0ab530c..28586ed 100644 --- a/packages/nextjs/hooks/token/types.ts +++ b/packages/nextjs/hooks/token/types.ts @@ -7,6 +7,7 @@ export type Token = { logoURI: string; hasBoostedVariant?: boolean; underlyingTokenAddress: string | null; + isBufferAllowed: boolean; priceRateProviderData: { address: string; summary: string; diff --git a/packages/nextjs/hooks/token/useExoticToken.ts b/packages/nextjs/hooks/token/useExoticToken.ts index b965202..7196f28 100644 --- a/packages/nextjs/hooks/token/useExoticToken.ts +++ b/packages/nextjs/hooks/token/useExoticToken.ts @@ -22,6 +22,7 @@ export function useExoticToken(searchText: string, filteredTokenOptions: Token[] chainId: targetNetwork.id, priceRateProviderData: null, underlyingTokenAddress: null, + isBufferAllowed: false, }; } }, [exoticTokenAddress, name, symbol, decimals, targetNetwork.id]); diff --git a/packages/nextjs/hooks/v3/useBoostableWhitelist.ts b/packages/nextjs/hooks/v3/useBoostableWhitelist.ts index 85ea97a..482d90a 100644 --- a/packages/nextjs/hooks/v3/useBoostableWhitelist.ts +++ b/packages/nextjs/hooks/v3/useBoostableWhitelist.ts @@ -46,6 +46,7 @@ export const useBoostableWhitelist = () => { logoURI isErc4626 underlyingTokenAddress + isBufferAllowed priceRateProviderData { address summary @@ -69,8 +70,9 @@ export const useBoostableWhitelist = () => { const data = json.data.tokenGetTokens; // Create map of underlying token address to matching boosted variant info + // If the token has an underlyingTokenAddress and isBufferAllowed const boostableTokensMap = data.reduce((acc: Record, token: Token) => { - if (token.underlyingTokenAddress) acc[token.underlyingTokenAddress] = token; + if (token.underlyingTokenAddress && token.isBufferAllowed) acc[token.underlyingTokenAddress] = token; return acc; }, {}); @@ -83,6 +85,7 @@ type BoostableWhitelist = { id: string; name: string; description: string; + icon: string; addresses: { [key: string]: Address[]; };