Open EmmaG2 opened 1 year ago
Use this code for your injected
variable in Homepage.tsx
const injected = new InjectedConnector({ supportedChainIds: [1, 3, 4, 5, 10, 42, 31337, 42161] })
And also, import InjectedConnector
import { InjectedConnector } from "@web3-react/injected-connector";
Hello @EmmaG2, i managed to solve this issue, you need to run yarn add web3-react or npm install web3-react and that is it, it will work 100%. 😁
Hi, when I try to create an instance of
InjectedConnector
, my applications brokes and get an error in the console.I'm working with React + Ts, and react-router dom.
I'm using this code to create the instance:
When I comment the code of the InjectedConnector, my applications work normally...
This is my App with the code commented
and this with the code uncommented
HomePage.tsx
codeutils.ts
code