@@ -126,12 +126,10 @@ import { BridgeToken } from '../Bridge/types';
126126/**
127127 * Determines the source and destination tokens for swap/bridge navigation.
128128 *
129- * When the asset is a native gas token (e.g., ETH), we set sourceToken to the default
130- * pair token for that chain (e.g., mUSD on mainnet) and destToken to the native token,
131- * allowing the user to swap INTO the native token.
132- *
133129 * When coming from the trending tokens list, the user likely wants to BUY the token,
134- * so we configure the swap with the native token as source and the asset as destination.
130+ * so we configure the swap with the asset as destination:
131+ * - For native tokens (ETH, BNB, etc.): use default pair token as source
132+ * - For other tokens: use native token as source
135133 *
136134 * Otherwise, we assume they want to SELL, so the asset is the source.
137135 *
@@ -145,6 +143,7 @@ export const getSwapTokens = (
145143 destToken : BridgeToken | undefined ;
146144} => {
147145 const wantsToBuyToken = isAssetFromTrending ( asset ) ;
146+ const isNative = isNativeAddress ( asset . address ) ;
148147
149148 // Build bridge token from asset
150149 const bridgeToken : BridgeToken = {
@@ -157,22 +156,23 @@ export const getSwapTokens = (
157156 image : asset . image ,
158157 } ;
159158
160- // If the asset is a native gas token, set source to the default pair token for that chain
161- // and dest to the native token, allowing the user to swap INTO the native token
162- if ( isNativeAddress ( asset . address ) ) {
163- return {
164- sourceToken : getDefaultDestToken ( bridgeToken . chainId ) ,
165- destToken : bridgeToken ,
166- } ;
167- }
168-
159+ // Trending page: user wants to BUY the token (token as destination)
169160 if ( wantsToBuyToken ) {
161+ // For native tokens, use default pair token as source (e.g., mUSD for ETH)
162+ if ( isNative ) {
163+ return {
164+ sourceToken : getDefaultDestToken ( bridgeToken . chainId ) ,
165+ destToken : bridgeToken ,
166+ } ;
167+ }
168+ // For non-native tokens, use native token as source
170169 return {
171170 sourceToken : getNativeSourceToken ( bridgeToken . chainId ) ,
172171 destToken : bridgeToken ,
173172 } ;
174173 }
175174
175+ // Home page: user wants to SELL the token (token as source)
176176 return {
177177 sourceToken : bridgeToken ,
178178 destToken : undefined ,
0 commit comments