File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,6 @@ import {
8181import { useI18nContext } from '../../../hooks/useI18nContext' ;
8282import { useTokensWithFiltering } from '../../../hooks/bridge/useTokensWithFiltering' ;
8383import {
84- setActiveNetwork ,
8584 setActiveNetworkWithError ,
8685 setSelectedAccount ,
8786} from '../../../store/actions' ;
@@ -560,7 +559,7 @@ const PrepareBridgePage = () => {
560559 name : isSwap ? TraceName . SwapViewLoaded : TraceName . BridgeViewLoaded ,
561560 timestamp : Date . now ( ) ,
562561 } ) ;
563- } , [ isSwap ] ) ;
562+ } , [ ] ) ;
564563
565564 // Set the default destination token for swaps (only when unified UI is disabled)
566565 useEffect ( ( ) => {
@@ -823,7 +822,7 @@ const PrepareBridgePage = () => {
823822 : toChain ?. chainId ;
824823
825824 if ( networkClientId ) {
826- dispatch ( setActiveNetwork ( networkClientId ) ) ;
825+ dispatch ( setActiveNetworkWithError ( networkClientId ) ) ;
827826 }
828827 if ( fromChain ?. chainId ) {
829828 dispatch ( setToChainId ( fromChain . chainId ) ) ;
@@ -875,9 +874,10 @@ const PrepareBridgePage = () => {
875874 }
876875 }
877876 customTokenListGenerator = {
878- // TODO: Fix in https://github.com/MetaMask/metamask-extension/issues/31880
879- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
880- toChain || isSwap ? toTokenListGenerator : undefined
877+ toChain &&
878+ ( isSwapFromUrl || toChain . chainId !== fromChain ?. chainId )
879+ ? toTokenListGenerator
880+ : undefined
881881 }
882882 amountInFiat = {
883883 // TODO: Fix in https://github.com/MetaMask/metamask-extension/issues/31880
You can’t perform that action at this time.
0 commit comments