From a7263a19a09a4f02c940687cea5dce590996259e Mon Sep 17 00:00:00 2001 From: Jacob Bryant Date: Thu, 5 Oct 2023 13:14:31 -0400 Subject: [PATCH 1/2] projectId for v2 walletconnect --- next.config.js | 1 + package.json | 6 +++--- src/contexts/WagmiContext.tsx | 28 +++++++++++++++------------- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/next.config.js b/next.config.js index 6e41accb0..87804c086 100644 --- a/next.config.js +++ b/next.config.js @@ -15,6 +15,7 @@ const nextConfig = { INFURA_KEY: process.env.INFURA_KEY, ALCHEMY_ARBITRUM_KEY: process.env.ALCHEMY_ARBITRUM_KEY, ALCHEMY_MAINNET_KEY: process.env.ALCHEMY_MAINNET_KEY, + WALLETCONNECT_PROJECT_ID: process.env.WALLETCONNECT_PROJECT_ID, ENV: process.env.NODE_ENV, TENDERLY_USER: process.env.TENDERLY_USER, diff --git a/package.json b/package.json index 71117965a..66d31face 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "app-v2", - "version": "2.5.35", + "version": "2.5.36", "private": true, "dependencies": { "@ethersproject/providers": "^5.6.8", "@multiavatar/multiavatar": "^1.0.6", "@openzeppelin/merkle-tree": "^1.0.4", - "@rainbow-me/rainbowkit": "^0.12.1", + "@rainbow-me/rainbowkit": "^0.12.0", "@yield-protocol/ui-math": "^1.0.15", "@yield-protocol/ui-multicall": "^1.0.9", "axios": "^1.3.4", @@ -31,7 +31,7 @@ "styled-components": "^5.3.1", "swr": "^2.0.0", "unique-names-generator": "^4.6.0", - "wagmi": "^0.12.1", + "wagmi": "^0.12.0", "web-vitals": "^3.3.0" }, "scripts": { diff --git a/src/contexts/WagmiContext.tsx b/src/contexts/WagmiContext.tsx index 9e0abda06..ce077bde1 100644 --- a/src/contexts/WagmiContext.tsx +++ b/src/contexts/WagmiContext.tsx @@ -12,6 +12,7 @@ import { Theme, AvatarComponent, lightTheme, + getDefaultWallets } from '@rainbow-me/rainbowkit'; import { @@ -36,6 +37,7 @@ const WagmiContext = ({ children }: { children: ReactNode }) => { const [useForkedEnv] = useCachedState(Settings.USE_FORKED_ENV, false); const [forkEnvUrl] = useCachedState(Settings.FORK_ENV_URL, process.env.REACT_APP_DEFAULT_FORK_RPC_URL); const defaultChainId = parseInt(process.env.REACT_APP_DEFAULT_CHAINID!) + const projectId = process.env.WALLETCONNECT_PROJECT_ID!; const chainConfig = useMemo( () => @@ -47,25 +49,25 @@ const WagmiContext = ({ children }: { children: ReactNode }) => { const { chains, provider } = configureChains(defaultChains, [chainConfig]); + const { wallets } = getDefaultWallets({ + appName: 'Yield-App-V2', + projectId, + chains, + }); + const connectors = connectorsForWallets([ + ...wallets, { groupName: 'Recommended', - wallets: [metaMaskWallet({ chains }), walletConnectWallet({ chains }), injectedWallet({ chains })], - }, - { - groupName: 'Experimental', wallets: [ - coinbaseWallet({ appName: 'yieldProtocol', chains }), - rainbowWallet({ chains }), - ledgerWallet({ chains }), - argentWallet({ chains }), - braveWallet({ chains }), + metaMaskWallet({ projectId, chains }), + walletConnectWallet({ projectId, chains }), + injectedWallet({ chains }), + rainbowWallet({ projectId, chains }), + ledgerWallet({ projectId, chains }), + argentWallet({ projectId, chains }), ], }, - { - groupName: 'Development Environments', - wallets: [], - }, ]); // Set up client From 17e7366e15ac1f15d4b7f7a2801059056e119cc4 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Fri, 6 Oct 2023 07:45:08 +0100 Subject: [PATCH 2/2] version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 66d31face..5ed228570 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "app-v2", - "version": "2.5.36", + "version": "2.5.37", "private": true, "dependencies": { "@ethersproject/providers": "^5.6.8",