Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update wagmi & rainbow for walletConnectV2 #381

Merged
merged 7 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@ethersproject/networks": "^5.7.1",
"@ethersproject/web": "^5.7.1",
"@heroicons/react": "^2.0.11",
"@rainbow-me/rainbowkit": "^0.11.0",
"@rainbow-me/rainbowkit": "^0.12.15",
"@uniswap/sdk": "^3.0.3",
"daisyui": "^2.31.0",
"ethers": "^5.0.0",
Expand All @@ -31,7 +31,7 @@
"react-hot-toast": "^2.4.0",
"use-debounce": "^8.0.4",
"usehooks-ts": "^2.7.2",
"wagmi": "^0.11.6",
"wagmi": "^0.12.13",
"zustand": "^4.1.2"
},
"devDependencies": {
Expand Down
7 changes: 7 additions & 0 deletions packages/nextjs/scaffold.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export type ScaffoldConfig = {
targetNetwork: chains.Chain;
pollingInterval: number;
alchemyApiKey: string;
walletConnectProjectId: string;
burnerWallet: {
enabled: boolean;
onlyLocal: boolean;
Expand All @@ -25,6 +26,12 @@ const scaffoldConfig = {
// .env.local for local testing, and in the Vercel/system env config for live apps.
alchemyApiKey: process.env.NEXT_PUBLIC_ALCHEMY_API_KEY || "oKxs-03sij-U_N0iOlrSsZFr29-IqbuF",

// This is ours WalletConnect's default project ID.
// You can get your own by at https://cloud.walletconnect.com
technophile-04 marked this conversation as resolved.
Show resolved Hide resolved
// It's recommended to store it in an env variable:
// .env.local for local testing, and in the Vercel/system env config for live apps.
walletConnectProjectId: process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID || "",
technophile-04 marked this conversation as resolved.
Show resolved Hide resolved
technophile-04 marked this conversation as resolved.
Show resolved Hide resolved

// Burner Wallet configuration
burnerWallet: {
// Set it to false to completely remove burner wallet from all networks
Expand Down
13 changes: 7 additions & 6 deletions packages/nextjs/services/web3/wagmiConnectors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@ export const appChains = configureChains(
},
);

const walletsOptions = { chains: appChains.chains, projectId: scaffoldConfig.walletConnectProjectId };
const wallets = [
metaMaskWallet({ chains: appChains.chains, shimDisconnect: true }),
walletConnectWallet({ chains: appChains.chains }),
ledgerWallet({ chains: appChains.chains }),
braveWallet({ chains: appChains.chains }),
coinbaseWallet({ appName: "scaffold-eth-2", chains: appChains.chains }),
rainbowWallet({ chains: appChains.chains }),
metaMaskWallet({ ...walletsOptions, shimDisconnect: true }),
walletConnectWallet(walletsOptions),
ledgerWallet(walletsOptions),
braveWallet(walletsOptions),
coinbaseWallet({ ...walletsOptions, appName: "scaffold-eth-2" }),
rainbowWallet(walletsOptions),
];

/**
Expand Down
Loading