diff --git a/.changeset/short-follow-clap.md b/.changeset/short-follow-clap.md new file mode 100644 index 0000000000..23dccdf0c3 --- /dev/null +++ b/.changeset/short-follow-clap.md @@ -0,0 +1,6 @@ +--- +'@rainbow-me/rainbowkit': minor +'example': patch +--- + +Added support for Frontier wallet \ No newline at end of file diff --git a/packages/rainbowkit/src/wallets/walletConnectors/frontierWallet/frontierWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/frontierWallet/frontierWallet.ts index 47a269ef96..c0042d00d8 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/frontierWallet/frontierWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/frontierWallet/frontierWallet.ts @@ -5,9 +5,13 @@ import { Wallet } from '../../Wallet'; export interface FrontierWalletOptions { chains: Chain[]; + shimDisconnect?: boolean; } -export const frontierWallet = ({ chains }: FrontierWalletOptions): Wallet => { +export const frontierWallet = ({ + chains, + shimDisconnect, +}: FrontierWalletOptions): Wallet => { // `isFrontier` needs to be added to the wagmi `Ethereum` object const installed = typeof window !== 'undefined' && @@ -34,6 +38,7 @@ export const frontierWallet = ({ chains }: FrontierWalletOptions): Wallet => { connector: new InjectedConnector({ chains, options: { + shimDisconnect, getProvider: () => //@ts-ignore installed ? (window.frontier?.ethereum as any) : undefined, diff --git a/site/data/docs/custom-wallet-list.mdx b/site/data/docs/custom-wallet-list.mdx index 46a4ae44ba..cec06e2307 100644 --- a/site/data/docs/custom-wallet-list.mdx +++ b/site/data/docs/custom-wallet-list.mdx @@ -155,6 +155,7 @@ import { frontierWallet } from '@rainbow-me/rainbowkit/wallets'; frontierWallet(options: { chains: Chain[]; + shimDisconnect?: boolean; }); ```