Skip to content

Commit

Permalink
fix: shim disconnect function update
Browse files Browse the repository at this point in the history
  • Loading branch information
punithbm committed Mar 1, 2023
1 parent 0bfec04 commit 8bae1ad
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/short-follow-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@rainbow-me/rainbowkit': minor
'example': patch
---

Added support for Frontier wallet
Original file line number Diff line number Diff line change
Expand Up @@ -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' &&
Expand All @@ -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,
Expand Down
1 change: 1 addition & 0 deletions site/data/docs/custom-wallet-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ import { frontierWallet } from '@rainbow-me/rainbowkit/wallets';

frontierWallet(options: {
chains: Chain[];
shimDisconnect?: boolean;
});
```

Expand Down

0 comments on commit 8bae1ad

Please sign in to comment.