From a4ee3d6f26cdd7b9fc038d39247d260ec39ad65f Mon Sep 17 00:00:00 2001 From: James Mealy Date: Mon, 23 Sep 2024 16:11:01 +0200 Subject: [PATCH] fix: do not disable currently selected network in the network selector (#4229) --- .../common/NetworkSelector/NetworkMultiSelector.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/common/NetworkSelector/NetworkMultiSelector.tsx b/src/components/common/NetworkSelector/NetworkMultiSelector.tsx index 6cd39c69f3..22f0a666e1 100644 --- a/src/components/common/NetworkSelector/NetworkMultiSelector.tsx +++ b/src/components/common/NetworkSelector/NetworkMultiSelector.tsx @@ -67,8 +67,9 @@ const NetworkMultiSelector = ({ if (isAdvancedFlow) return optionNetwork.chainId != firstSelectedNetwork.chainId // Check required feature toggles + const optionIsSelectedNetwork = firstSelectedNetwork.chainId === optionNetwork.chainId if (!hasMultiChainCreationFeatures(optionNetwork) || !hasMultiChainCreationFeatures(firstSelectedNetwork)) { - return true + return !optionIsSelectedNetwork } // Check if required deployments are available @@ -88,7 +89,7 @@ const NetworkMultiSelector = ({ ) // Only 1.4.1 safes with canonical deployment addresses can be deployed as part of a multichain group - if (!selectedHasCanonicalSingletonDeployment) return firstSelectedNetwork.chainId !== optionNetwork.chainId + if (!selectedHasCanonicalSingletonDeployment) return !optionIsSelectedNetwork return !optionHasCanonicalSingletonDeployment }, [isAdvancedFlow, selectedNetworks],