Skip to content

Commit

Permalink
add zerion extension support (#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndoherty-xyz authored Oct 16, 2023
1 parent 825f95e commit b472123
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/connectkit/src/utils/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,13 @@ export const isRainbow = () => {
ethereum?.providers.find((provider) => provider.isRainbow))
);
};

export const isZerion = () => {
if (typeof window === 'undefined') return false;
const { ethereum } = window;
return !!(
ethereum?.isZerion ||
(ethereum?.providers &&
ethereum?.providers.find((provider) => provider.isZerion))
);
};
4 changes: 4 additions & 0 deletions packages/connectkit/src/wallets/connectors/zerion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ import { WalletProps } from './../wallet';

import { isAndroid } from '../../utils';
import Logos from './../../assets/logos';
import { isZerion } from '../../utils/wallets';

export const zerion = (): WalletProps => {
const isInstalled = isZerion();

return {
id: 'zerion',
name: 'Zerion',
Expand All @@ -24,5 +27,6 @@ export const zerion = (): WalletProps => {
? uri
: `https://app.zerion.io/wc?uri=${encodeURIComponent(uri)}`;
},
installed: isInstalled,
};
};

4 comments on commit b472123

@vercel
Copy link

@vercel vercel bot commented on b472123 Oct 16, 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 b472123 Oct 16, 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-lfe.vercel.app
connectkit-nextjs-git-main-lfe.vercel.app
connectkit-nextjs.vercel.app

@vercel
Copy link

@vercel vercel bot commented on b472123 Oct 16, 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-git-main-lfe.vercel.app
connectkit-testbench-lfe.vercel.app
connectkit-testbench.vercel.app

@vercel
Copy link

@vercel vercel bot commented on b472123 Oct 16, 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-lfe.vercel.app
connectkit-cra.vercel.app

Please sign in to comment.