Skip to content

Commit

Permalink
feat: wigwam wallet support (#2206)
Browse files Browse the repository at this point in the history
* Wigwam wallet support

* feat: wigwam wallet support

* fix: rollback additional translations

* fix: rollback single quote

* fix: format docs
  • Loading branch information
serg-plusplus authored Oct 21, 2024
1 parent 23179e5 commit 4e52610
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/example/src/wagmi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import {
uniswapWallet,
valoraWallet,
walletConnectWallet,
wigwamWallet,
xdefiWallet,
zealWallet,
zerionWallet,
Expand Down Expand Up @@ -235,6 +236,7 @@ export const config = getDefaultConfig({
trustWallet,
uniswapWallet,
valoraWallet,
wigwamWallet,
xdefiWallet,
zealWallet,
zerionWallet,
Expand Down
17 changes: 17 additions & 0 deletions packages/rainbowkit/src/locales/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,23 @@
}
},

"wigwam": {
"extension": {
"step1": {
"title": "Install the Wigwam extension",
"description": "We recommend pinning Wigwam to your taskbar for quicker access to your wallet."
},
"step2": {
"title": "Create or Import a Wallet",
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
},
"step3": {
"title": "Refresh your browser",
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
}
}
},

"talisman": {
"extension": {
"step1": {
Expand Down
1 change: 1 addition & 0 deletions packages/rainbowkit/src/types/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export type WalletProviderFlags =
| 'isMEWwallet'
| 'isSafeheron'
| 'isSafePal'
| 'isWigwam'
| '__seif';

export type WalletProvider = Evaluate<
Expand Down
2 changes: 2 additions & 0 deletions packages/rainbowkit/src/wallets/walletConnectors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import { trustWallet } from './trustWallet/trustWallet';
import { uniswapWallet } from './uniswapWallet/uniswapWallet';
import { valoraWallet } from './valoraWallet/valoraWallet';
import { walletConnectWallet } from './walletConnectWallet/walletConnectWallet';
import { wigwamWallet } from './wigwamWallet/wigwamWallet';
import { xdefiWallet } from './xdefiWallet/xdefiWallet';
import { zealWallet } from './zealWallet/zealWallet';
import { zerionWallet } from './zerionWallet/zerionWallet';
Expand Down Expand Up @@ -119,6 +120,7 @@ export {
uniswapWallet,
valoraWallet,
walletConnectWallet,
wigwamWallet,
xdefiWallet,
zealWallet,
zerionWallet,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import type { Wallet } from '../../Wallet';
import {
getInjectedConnector,
hasInjectedProvider,
} from '../../getInjectedConnector';

export const wigwamWallet = (): Wallet => {
return {
id: 'wigwam',
name: 'Wigwam',
iconBackground: '#80EF6E',
iconUrl: async () => (await import('./wigwamWallet.svg')).default,
downloadUrls: {
chrome:
'https://chromewebstore.google.com/detail/wigwam-%E2%80%94-web3-wallet/lccbohhgfkdikahanoclbdmaolidjdfl',
browserExtension: 'https://wigwam.app',
},
installed: hasInjectedProvider({
namespace: 'wigwamEthereum',
flag: 'isWigwam',
}),
extension: {
instructions: {
learnMoreUrl: 'https://wigwam.app/',
steps: [
{
description: 'wallet_connectors.wigwam.extension.step1.description',
step: 'install',
title: 'wallet_connectors.wigwam.extension.step1.title',
},
{
description: 'wallet_connectors.wigwam.extension.step2.description',
step: 'create',
title: 'wallet_connectors.wigwam.extension.step2.title',
},
{
description: 'wallet_connectors.wigwam.extension.step3.description',
step: 'refresh',
title: 'wallet_connectors.wigwam.extension.step3.title',
},
],
},
},
createConnector: getInjectedConnector({
namespace: 'wigwamEthereum',
flag: 'isWigwam',
}),
};
};
6 changes: 6 additions & 0 deletions site/data/en-US/docs/custom-wallet-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,12 @@ import { xdefiWallet } from '@rainbow-me/rainbowkit/wallets';
import { zerionWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Wigwam

```tsx
import { wigwamWallet } from '@rainbow-me/rainbowkit/wallets';
```

### Examples

#### Ordering
Expand Down

0 comments on commit 4e52610

Please sign in to comment.