-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Zeal wallet * Remove @ts-expect-error * fix: migration to i18n, rebase fixes * fix: changeset * fix: icon --------- Co-authored-by: Daniel Sinclair <d@niel.nyc>
- Loading branch information
1 parent
924d776
commit 2c8abbb
Showing
8 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
'@rainbow-me/rainbowkit': patch | ||
--- | ||
|
||
Zeal Support | ||
|
||
**Example usage** | ||
|
||
```ts | ||
import { | ||
getDefaultWallets, | ||
connectorsForWallets, | ||
} from '@rainbow-me/rainbowkit'; | ||
import { zealWallet } from '@rainbow-me/rainbowkit/wallets'; | ||
const { wallets } = getDefaultWallets({ appName, chains }); | ||
const connectors = connectorsForWallets([ | ||
...wallets, | ||
{ | ||
groupName: 'Other', | ||
wallets: [zealWallet({ chains })], | ||
}, | ||
]); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/rainbowkit/src/wallets/walletConnectors/zealWallet/zealWallet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions
51
packages/rainbowkit/src/wallets/walletConnectors/zealWallet/zealWallet.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import type { InjectedConnectorOptions } from '@wagmi/core/connectors/injected'; | ||
import { InjectedConnector } from 'wagmi/connectors/injected'; | ||
import { Chain } from '../../../components/RainbowKitProvider/RainbowKitChainContext'; | ||
import { Wallet } from '../../Wallet'; | ||
import { hasInjectedProvider } from '../../getInjectedConnector'; | ||
|
||
export interface ZealWalletOptions { | ||
chains: Chain[]; | ||
} | ||
|
||
export const zealWallet = ({ | ||
chains, | ||
...options | ||
}: ZealWalletOptions & InjectedConnectorOptions): Wallet => ({ | ||
id: 'zeal', | ||
name: 'Zeal', | ||
iconUrl: async () => (await import('./zealWallet.svg')).default, | ||
iconBackground: '#fff0', | ||
installed: hasInjectedProvider('isZeal'), | ||
downloadUrls: { | ||
browserExtension: 'https://zeal.app', | ||
}, | ||
createConnector: () => ({ | ||
connector: new InjectedConnector({ | ||
chains, | ||
options, | ||
}), | ||
extension: { | ||
instructions: { | ||
learnMoreUrl: 'https://zeal.app/', | ||
steps: [ | ||
{ | ||
description: 'wallet_connectors.zeal.extension.step1.description', | ||
step: 'install', | ||
title: 'wallet_connectors.zeal.extension.step1.title', | ||
}, | ||
{ | ||
description: 'wallet_connectors.zeal.extension.step2.description', | ||
step: 'create', | ||
title: 'wallet_connectors.zeal.extension.step2.title', | ||
}, | ||
{ | ||
description: 'wallet_connectors.zeal.extension.step3.description', | ||
step: 'refresh', | ||
title: 'wallet_connectors.zeal.extension.step3.title', | ||
}, | ||
], | ||
}, | ||
}, | ||
}), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2c8abbb
There was a problem hiding this comment.
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:
rainbowkit-site – ./
rainbowkit.vercel.app
rainbowkit-site-git-main-rainbowdotme.vercel.app
rainbowkit-site-rainbowdotme.vercel.app
www.rainbowkit.com
rainbowkit.com
2c8abbb
There was a problem hiding this comment.
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:
rainbowkit-example – ./
rainbowkit-example-git-main-rainbowdotme.vercel.app
rainbowkit-example.vercel.app
rainbowkit-example-rainbowdotme.vercel.app