diff --git a/packages/connectkit/src/components/Common/Modal/index.tsx b/packages/connectkit/src/components/Common/Modal/index.tsx index ea0cb7e1..44d309bb 100644 --- a/packages/connectkit/src/components/Common/Modal/index.tsx +++ b/packages/connectkit/src/components/Common/Modal/index.tsx @@ -48,6 +48,7 @@ import { useSIWE } from '../../../siwe'; import useLocales from '../../../hooks/useLocales'; import FitText from '../FitText'; import useDefaultWallets from '../../../wallets/useDefaultWallets'; +import { useInjectedWallet } from '../../../hooks/connectors/useInjectedWallet'; const ProfileIcon = ({ isSignedIn }: { isSignedIn?: boolean }) => (
@@ -213,8 +214,11 @@ const Modal: React.FC = ({ const installedWallets = wallets.filter((wallet) => wallet.installed); let connector = supportedConnectors.find((c) => c.id === context.connector); + + const injected = useInjectedWallet(); + if (isInjectedConnector(context.connector)) { - const wallet = installedWallets[0]; + const wallet = injected.enabled ? injected.wallet : installedWallets[0]; connector = { ...wallet, extensionIsInstalled: () => {