diff --git a/.changeset/itchy-hairs-unite.md b/.changeset/itchy-hairs-unite.md new file mode 100644 index 0000000000..e602a19473 --- /dev/null +++ b/.changeset/itchy-hairs-unite.md @@ -0,0 +1,5 @@ +--- +"@rainbow-me/rainbowkit": patch +--- + +Added Nest Wallet support with `nestWallet` wallet connector diff --git a/packages/example/pages/_app.tsx b/packages/example/pages/_app.tsx index 992ac3760c..bacc1f8ec2 100644 --- a/packages/example/pages/_app.tsx +++ b/packages/example/pages/_app.tsx @@ -43,6 +43,7 @@ import { ledgerWallet, magicEdenWallet, mewWallet, + nestWallet, oktoWallet, okxWallet, omniWallet, @@ -209,6 +210,7 @@ const config = getDefaultConfig({ ledgerWallet, magicEdenWallet, mewWallet, + nestWallet, oktoWallet, okxWallet, omniWallet, diff --git a/packages/rainbowkit/src/locales/en_US.json b/packages/rainbowkit/src/locales/en_US.json index 82b5909fb7..b1ec9b52fa 100644 --- a/packages/rainbowkit/src/locales/en_US.json +++ b/packages/rainbowkit/src/locales/en_US.json @@ -682,6 +682,23 @@ } }, + "nestwallet": { + "extension": { + "step1": { + "title": "Install the NestWallet extension", + "description": "We recommend pinning NestWallet 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." + } + } + }, + "okx": { "qr_code": { "step1": { diff --git a/packages/rainbowkit/src/types/utils.ts b/packages/rainbowkit/src/types/utils.ts index bc29ea6698..f9574c4f72 100644 --- a/packages/rainbowkit/src/types/utils.ts +++ b/packages/rainbowkit/src/types/utils.ts @@ -37,6 +37,7 @@ export type WalletProviderFlags = | 'isKuCoinWallet' | 'isMathWallet' | 'isMetaMask' + | 'isNestWallet' | 'isOkxWallet' | 'isOKExWallet' | 'isOneInchAndroidWallet' diff --git a/packages/rainbowkit/src/wallets/walletConnectors/index.ts b/packages/rainbowkit/src/wallets/walletConnectors/index.ts index 527760e104..4167b3e2e1 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/index.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/index.ts @@ -27,6 +27,7 @@ import { ledgerWallet } from './ledgerWallet/ledgerWallet'; import { magicEdenWallet } from './magicEdenWallet/magicEdenWallet'; import { metaMaskWallet } from './metaMaskWallet/metaMaskWallet'; import { mewWallet } from './mewWallet/mewWallet'; +import { nestWallet } from './nestWallet/nestWallet'; import { oktoWallet } from './oktoWallet/oktoWallet'; import { okxWallet } from './okxWallet/okxWallet'; import { omniWallet } from './omniWallet/omniWallet'; @@ -82,6 +83,7 @@ export { magicEdenWallet, metaMaskWallet, mewWallet, + nestWallet, oktoWallet, okxWallet, omniWallet, diff --git a/packages/rainbowkit/src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts index dcfebd558e..331a629bb4 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts @@ -35,6 +35,7 @@ function isMetaMask(ethereum?: WindowProvider['ethereum']): boolean { if (ethereum.isImToken) return false; if (ethereum.isKuCoinWallet) return false; if (ethereum.isMathWallet) return false; + if (ethereum.isNestWallet) return false; if (ethereum.isOkxWallet || ethereum.isOKExWallet) return false; if (ethereum.isOneInchIOSWallet || ethereum.isOneInchAndroidWallet) return false; diff --git a/packages/rainbowkit/src/wallets/walletConnectors/nestWallet/nestWallet.svg b/packages/rainbowkit/src/wallets/walletConnectors/nestWallet/nestWallet.svg new file mode 100644 index 0000000000..396cace10a --- /dev/null +++ b/packages/rainbowkit/src/wallets/walletConnectors/nestWallet/nestWallet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/rainbowkit/src/wallets/walletConnectors/nestWallet/nestWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/nestWallet/nestWallet.ts new file mode 100644 index 0000000000..b6d0c9c2bc --- /dev/null +++ b/packages/rainbowkit/src/wallets/walletConnectors/nestWallet/nestWallet.ts @@ -0,0 +1,42 @@ +import { Wallet } from '../../Wallet'; +import { + getInjectedConnector, + hasInjectedProvider, +} from '../../getInjectedConnector'; + +export const nestWallet = (): Wallet => ({ + id: 'nest', + name: 'Nest', + iconUrl: async () => (await import('./nestWallet.svg')).default, + iconBackground: '#fff0', + installed: hasInjectedProvider({ flag: 'isNestWallet' }), + downloadUrls: { + browserExtension: 'https://nestwallet.xyz', + }, + extension: { + instructions: { + learnMoreUrl: 'https://nestwallet.xyz', + steps: [ + { + description: + 'wallet_connectors.nestwallet.extension.step1.description', + step: 'install', + title: 'wallet_connectors.nestwallet.extension.step1.title', + }, + { + description: + 'wallet_connectors.nestwallet.extension.step2.description', + step: 'create', + title: 'wallet_connectors.nestwallet.extension.step2.title', + }, + { + description: + 'wallet_connectors.nestwallet.extension.step3.description', + step: 'refresh', + title: 'wallet_connectors.nestwallet.extension.step3.title', + }, + ], + }, + }, + createConnector: getInjectedConnector({ flag: 'isNestWallet' }), +});