From 5a51ad241f765bd30c9c95fb62395d8d57099f6f Mon Sep 17 00:00:00 2001 From: Jiro Date: Thu, 28 Nov 2024 08:03:46 -0800 Subject: [PATCH] fixing binance chain issue --- src/components/Header/NetworkSelection.tsx | 6 +++++- .../NetworkSelectionDropdown/NetworkSelectionDropdown.tsx | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/Header/NetworkSelection.tsx b/src/components/Header/NetworkSelection.tsx index 70103728c..4a82a8fe2 100644 --- a/src/components/Header/NetworkSelection.tsx +++ b/src/components/Header/NetworkSelection.tsx @@ -48,7 +48,11 @@ export const NetworkSelection: React.FC = () => { {openNetworkSelection ? : } - {openNetworkSelection && } + {openNetworkSelection && ( + + )} ); }; diff --git a/src/components/NetworkSelectionDropdown/NetworkSelectionDropdown.tsx b/src/components/NetworkSelectionDropdown/NetworkSelectionDropdown.tsx index dd74dad62..e1ca9e1ce 100644 --- a/src/components/NetworkSelectionDropdown/NetworkSelectionDropdown.tsx +++ b/src/components/NetworkSelectionDropdown/NetworkSelectionDropdown.tsx @@ -14,7 +14,9 @@ import CustomTabSwitch from 'components/v3/CustomTabSwitch'; import ActiveDotImage from 'assets/images/chainActiveDot.png'; import { useSwitchNetwork } from '@web3modal/ethers5/react'; -const NetworkSelectionDropdown: React.FC = () => { +const NetworkSelectionDropdown: React.FC<{ + setOpenNetworkSelection: (isOpen: boolean) => void; +}> = ({ setOpenNetworkSelection }) => { const { t } = useTranslation(); const arcxSdk = useArcxAnalytics(); const { chainId, account, currentChainId } = useActiveWeb3React(); @@ -57,6 +59,7 @@ const NetworkSelectionDropdown: React.FC = () => { if (!currentChainId) { window.location.reload(); } + setOpenNetworkSelection(false); }, [account, arcxSdk, currentChainId, switchNetwork], );