diff --git a/wormhole-connect/src/components/TokensModal.tsx b/wormhole-connect/src/components/TokensModal.tsx index ca9febfed..50bbaf891 100644 --- a/wormhole-connect/src/components/TokensModal.tsx +++ b/wormhole-connect/src/components/TokensModal.tsx @@ -482,7 +482,7 @@ function TokensModal(props: Props) { useEffect(() => { // get tokens that exist on the chain and have a balance greater than 0 - const filtered = supportedTokens.filter((t) => { + let filtered = supportedTokens.filter((t) => { if (!t.tokenId && t.nativeChain !== chain) return false; // if token is USDC and the chain is cctp enabled, only show native ones @@ -511,6 +511,16 @@ function TokensModal(props: Props) { const isNonzeroBalance = b !== null && b !== '0'; return isNonzeroBalance; }); + + // If any of the tokens are native to the chain, only show those. + // This is to avoid users inadvertently receiving wrapped versions of the token. + if (type === 'dest') { + const nativeTokens = filtered.filter((t) => t.nativeChain === chain); + if (nativeTokens.length > 0) { + filtered = nativeTokens; + } + } + setTokens(filtered); }, [chainBalancesCache, chain, supportedTokens, type]); diff --git a/wormhole-connect/src/routes/utils.ts b/wormhole-connect/src/routes/utils.ts index a05f1b8fc..40b4e160b 100644 --- a/wormhole-connect/src/routes/utils.ts +++ b/wormhole-connect/src/routes/utils.ts @@ -87,27 +87,27 @@ export const isIlliquidDestToken = ( return true; } } - // Users should send USDC to Fantom via NTT instead of the token bridge - if ( - symbol === 'USDC' && - nativeChain === 'ethereum' && - destChain === 'fantom' - ) { - return true; - } - if ( - symbol === 'USDC' && - nativeChain === 'fuji' && - destChain === 'alfajores' - ) { - return true; - } - if ( - symbol === 'USDC.e' && - (nativeChain === 'fantom' || nativeChain === 'alfajores') - ) { - return true; - } + //// Users should send USDC to Fantom via NTT instead of the token bridge + //if ( + // symbol === 'USDC' && + // nativeChain === 'ethereum' && + // destChain === 'fantom' + //) { + // return true; + //} + //if ( + // symbol === 'USDC' && + // nativeChain === 'fuji' && + // destChain === 'alfajores' + //) { + // return true; + //} + //if ( + // symbol === 'USDC.e' && + // (nativeChain === 'fantom' || nativeChain === 'alfajores') + //) { + // return true; + //} return false; };