diff --git a/.changeset/new-cameras-eat.md b/.changeset/new-cameras-eat.md new file mode 100644 index 0000000000..53a5797c72 --- /dev/null +++ b/.changeset/new-cameras-eat.md @@ -0,0 +1,7 @@ +--- +"@rainbow-me/rainbowkit": patch +"example": patch +"site": patch +--- + +Added Kresus support with `kresusWallet` wallet connector diff --git a/packages/example/pages/_app.tsx b/packages/example/pages/_app.tsx index c85d8d055b..8d910d469f 100644 --- a/packages/example/pages/_app.tsx +++ b/packages/example/pages/_app.tsx @@ -33,6 +33,7 @@ import { frameWallet, frontierWallet, imTokenWallet, + kresusWallet, ledgerWallet, mewWallet, oktoWallet, @@ -160,6 +161,7 @@ const config = getDefaultConfig({ frameWallet, frontierWallet, imTokenWallet, + kresusWallet, ledgerWallet, mewWallet, oktoWallet, diff --git a/packages/rainbowkit/src/locales/en_US.json b/packages/rainbowkit/src/locales/en_US.json index 0f78242755..533d26b259 100644 --- a/packages/rainbowkit/src/locales/en_US.json +++ b/packages/rainbowkit/src/locales/en_US.json @@ -502,6 +502,23 @@ } }, + "kresus": { + "qr_code": { + "step1": { + "title": "Open the Kresus Wallet app", + "description": "Add Kresus Wallet to your home screen for faster access to your wallet." + }, + "step2": { + "title": "Create or Import a Wallet", + "description": "Create a new wallet or import an existing one." + }, + "step3": { + "title": "Tap the QR icon and scan", + "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect." + } + } + }, + "metamask": { "qr_code": { "step1": { diff --git a/packages/rainbowkit/src/wallets/walletConnectors/index.ts b/packages/rainbowkit/src/wallets/walletConnectors/index.ts index 1de5a16c40..1465e869e7 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/index.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/index.ts @@ -16,6 +16,7 @@ import { frameWallet } from './frameWallet/frameWallet'; import { frontierWallet } from './frontierWallet/frontierWallet'; import { imTokenWallet } from './imTokenWallet/imTokenWallet'; import { injectedWallet } from './injectedWallet/injectedWallet'; +import { kresusWallet } from './kresusWallet/kresusWallet'; import { ledgerWallet } from './ledgerWallet/ledgerWallet'; import { metaMaskWallet } from './metaMaskWallet/metaMaskWallet'; import { mewWallet } from './mewWallet/mewWallet'; @@ -61,6 +62,7 @@ export { frontierWallet, imTokenWallet, injectedWallet, + kresusWallet, ledgerWallet, metaMaskWallet, mewWallet, diff --git a/packages/rainbowkit/src/wallets/walletConnectors/kresusWallet/kresusWallet.svg b/packages/rainbowkit/src/wallets/walletConnectors/kresusWallet/kresusWallet.svg new file mode 100644 index 0000000000..ba1805eab8 --- /dev/null +++ b/packages/rainbowkit/src/wallets/walletConnectors/kresusWallet/kresusWallet.svg @@ -0,0 +1 @@ + diff --git a/packages/rainbowkit/src/wallets/walletConnectors/kresusWallet/kresusWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/kresusWallet/kresusWallet.ts new file mode 100644 index 0000000000..009a65584b --- /dev/null +++ b/packages/rainbowkit/src/wallets/walletConnectors/kresusWallet/kresusWallet.ts @@ -0,0 +1,51 @@ +import { DefaultWalletOptions, Wallet } from '../../Wallet'; +import { getWalletConnectConnector } from '../../getWalletConnectConnector'; + +export type KresusWalletOptions = DefaultWalletOptions; + +export const kresusWallet = ({ + projectId, + walletConnectParameters, +}: KresusWalletOptions): Wallet => ({ + id: 'kresus-wallet', + name: 'Kresus Wallet', + iconUrl: async () => (await import('./kresusWallet.svg')).default, + iconBackground: '#fff', + downloadUrls: { + android: + 'https://play.google.com/store/apps/details?id=com.kresus.superapp', + ios: 'https://apps.apple.com/us/app/kresus-crypto-nft-superapp/id6444355152', + qrCode: 'https://kresusconnect.kresus.com/download', + }, + mobile: { + getUri: (uri: string) => + `com.kresus.superapp://wc?uri=${encodeURIComponent(uri)}`, + }, + qrCode: { + getUri: (uri: string) => uri, + instructions: { + learnMoreUrl: 'https://kresus.com/', + steps: [ + { + description: 'wallet_connectors.kresus.qr_code.step1.description', + step: 'install', + title: 'wallet_connectors.kresus.qr_code.step1.title', + }, + { + description: 'wallet_connectors.kresus.qr_code.step2.description', + step: 'create', + title: 'wallet_connectors.kresus.qr_code.step2.title', + }, + { + description: 'wallet_connectors.kresus.qr_code.step3.description', + step: 'scan', + title: 'wallet_connectors.kresus.qr_code.step3.title', + }, + ], + }, + }, + createConnector: getWalletConnectConnector({ + projectId, + walletConnectParameters, + }), +}); diff --git a/site/data/en-US/docs/custom-wallet-list.mdx b/site/data/en-US/docs/custom-wallet-list.mdx index 373ff823ff..fdeeff1a3c 100644 --- a/site/data/en-US/docs/custom-wallet-list.mdx +++ b/site/data/en-US/docs/custom-wallet-list.mdx @@ -254,6 +254,16 @@ imTokenWallet(options: { }); ``` +#### Kresus Wallet + +```tsx +import { kresusWallet } from '@rainbow-me/rainbowkit/wallets'; + +kresusWallet(options: { + projectId: string; +}); +``` + #### MetaMask ```tsx