diff --git a/src/header.tsx b/src/header.tsx index 9343b7a..b355cc4 100644 --- a/src/header.tsx +++ b/src/header.tsx @@ -52,7 +52,7 @@ export const Header = () => { const { network, selectNetwork, lightClientLoaded, isLight } = useNetwork() const { accounts, selectAccount, selectedAccount } = useAccounts() const [, disconnectAll] = useWalletDisconnector() - const [isConnectionDialiogOpen, setIsConnectionDialiogOpen] = useState(false) + const [isConnectionDialogOpen, setIsConnectionDialogOpen] = useState(false) // eslint-disable-next-line const { theme, setTheme } = useTheme() const { search } = useLocation() @@ -60,6 +60,7 @@ export const Header = () => { useEffect(() => { if (!selectedAccount?.address && accounts.length > 0) { selectAccount(accounts[0]) + setIsConnectionDialogOpen(false) } }, [accounts, selectAccount, selectedAccount?.address]) @@ -164,7 +165,7 @@ export const Header = () => { {!accounts.length && ( - )} @@ -207,6 +208,15 @@ export const Header = () => { )} ))} + { + setIsConnectionDialogOpen(true) + }} + > + Show wallets + { setIsConnectionDialiogOpen(false)} + open={isConnectionDialogOpen} + onClose={() => setIsConnectionDialogOpen(false)} /> )