Skip to content

Commit

Permalink
feat: improve vite example
Browse files Browse the repository at this point in the history
  • Loading branch information
EdouardBougon committed Dec 10, 2024
1 parent e13ed39 commit 298bcff
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/with-vite/.env.local.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_PUBLIC_WALLETCONNECT_PROJECT_ID= # Required for WalletConnect v2
39 changes: 37 additions & 2 deletions examples/with-vite/src/wagmi.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,44 @@

import { getDefaultConfig } from '@rainbow-me/rainbowkit';
import { arbitrum, base, mainnet, optimism, polygon } from 'wagmi/chains';
import {
metaMaskWallet,
safeWallet,
rainbowWallet,
coinbaseWallet,
walletConnectWallet,
rabbyWallet,
trustWallet,
uniswapWallet
} from '@rainbow-me/rainbowkit/wallets';

// Enable Smart Wallet and EOA
// Testing `preference` type
coinbaseWallet.preference = 'all';

export const config = getDefaultConfig({
appName: 'RainbowKit demo',
projectId: 'YOUR_PROJECT_ID',
chains: [mainnet, polygon, optimism, arbitrum, base],
projectId: import.meta.env.VITE_PUBLIC_WALLETCONNECT_PROJECT_ID ?? 'YOUR_PROJECT_ID',
chains: [mainnet,
polygon, optimism, arbitrum, base],
wallets: [
{
groupName: 'Popular',
wallets: [
safeWallet,
rainbowWallet,
coinbaseWallet,
metaMaskWallet,
walletConnectWallet,
],
},
{
groupName: 'Other',
wallets: [
rabbyWallet,
trustWallet,
uniswapWallet,
],
},
]
});

0 comments on commit 298bcff

Please sign in to comment.