Skip to content

Commit

Permalink
Merge pull request #1626 from jirokobadev/hotfix/binance-chain-change…
Browse files Browse the repository at this point in the history
…-issue
  • Loading branch information
sameepsi authored Nov 28, 2024
2 parents 9f1ee56 + 5a51ad2 commit fe7a2f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/components/Header/NetworkSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ export const NetworkSelection: React.FC = () => {
</small>
{openNetworkSelection ? <KeyboardArrowUp /> : <KeyboardArrowDown />}
</Box>
{openNetworkSelection && <NetworkSelectionDropdown />}
{openNetworkSelection && (
<NetworkSelectionDropdown
setOpenNetworkSelection={setOpenNetworkSelection}
/>
)}
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -57,6 +59,7 @@ const NetworkSelectionDropdown: React.FC = () => {
if (!currentChainId) {
window.location.reload();
}
setOpenNetworkSelection(false);
},
[account, arcxSdk, currentChainId, switchNetwork],
);
Expand Down

0 comments on commit fe7a2f0

Please sign in to comment.