Skip to content

Commit

Permalink
fix: name in heading for injected wallet without config
Browse files Browse the repository at this point in the history
  • Loading branch information
lochie committed Aug 28, 2023
1 parent 64d20c2 commit 66f9362
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/connectkit/src/components/Common/Modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => (
<div style={{ position: 'relative' }}>
Expand Down Expand Up @@ -213,8 +214,11 @@ const Modal: React.FC<ModalProps> = ({
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: () => {
Expand Down

4 comments on commit 66f9362

@vercel
Copy link

@vercel vercel bot commented on 66f9362 Aug 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

connectkit-vite – ./

connectkit-vite-lfe.vercel.app
connectkit-vite-git-main-lfe.vercel.app
connectkit-vite.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 66f9362 Aug 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

connectkit-cra – ./

connectkit-cra-git-main-lfe.vercel.app
connectkit-cra.vercel.app
connectkit-cra-lfe.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 66f9362 Aug 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

connectkit-testbench – ./

connectkit-testbench-lfe.vercel.app
connectkit-testbench.vercel.app
connectkit-testbench-git-main-lfe.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 66f9362 Aug 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

connectkit-nextjs – ./

connectkit-nextjs.vercel.app
connectkit-nextjs-lfe.vercel.app
connectkit-nextjs-git-main-lfe.vercel.app

Please sign in to comment.