@@ -359,7 +359,7 @@ const UnifiedTransactionsView = ({
359359 ] ) ;
360360
361361 const hasEvmChainsEnabled = enabledEVMChainIds . length > 0 ;
362- const firstBlockExplorer = useBlockExplorer (
362+ const popularListBlockExplorer = useBlockExplorer (
363363 hasEvmChainsEnabled ? enabledEVMChainIds [ 0 ] : undefined ,
364364 ) ;
365365
@@ -384,20 +384,19 @@ const UnifiedTransactionsView = ({
384384 } , [ enabledEVMChainIds , evmNetworkConfigurationsByChainId ] ) ;
385385
386386 const blockExplorerUrl = useMemo ( ( ) => {
387- // TODO: We should make sure configBlockExplorerUrl contains all blockexplorer needed
388- // This workaround was added to fix the issue, but it's not a good solution to have to different
389- // sources of truth for block explorer urls.
387+ // configBlockExplorerUrl contains block explorer urls only for networks added by default after fresh install
388+ // other networks should use PopularList, which is used by useBlockExplorer hook
390389 if ( configBlockExplorerUrl ) {
391390 return configBlockExplorerUrl ;
392391 }
393392 return hasEvmChainsEnabled
394- ? firstBlockExplorer . getBlockExplorerUrl (
393+ ? popularListBlockExplorer . getBlockExplorerUrl (
395394 selectedAccountGroupEvmAddress ,
396395 ) || undefined
397396 : undefined ;
398397 } , [
399398 configBlockExplorerUrl ,
400- firstBlockExplorer ,
399+ popularListBlockExplorer ,
401400 selectedAccountGroupEvmAddress ,
402401 hasEvmChainsEnabled ,
403402 ] ) ;
@@ -429,7 +428,7 @@ const UnifiedTransactionsView = ({
429428 } else {
430429 url = blockExplorerUrl ;
431430 title = hasEvmChainsEnabled
432- ? firstBlockExplorer . getBlockExplorerName ( enabledEVMChainIds [ 0 ] )
431+ ? popularListBlockExplorer . getBlockExplorerName ( enabledEVMChainIds [ 0 ] )
433432 : undefined ;
434433 }
435434
@@ -445,7 +444,7 @@ const UnifiedTransactionsView = ({
445444 providerType ,
446445 blockExplorerUrl ,
447446 selectedAccountGroupEvmAddress ,
448- firstBlockExplorer ,
447+ popularListBlockExplorer ,
449448 enabledEVMChainIds ,
450449 configBlockExplorerUrl ,
451450 hasEvmChainsEnabled ,
0 commit comments