MCPcopy Index your code
hub / github.com/Shmoji/web3-react-example / connect

Function connect

pages/index.js:8–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6 const { active, account, library, connector, activate, deactivate } = useWeb3React()
7
8 async function connect() {
9 try {
10 await activate(injected)
11 localStorage.setItem('isWalletConnected', true)
12 } catch (ex) {
13 console.log(ex)
14 }
15 }
16
17 async function disconnect() {
18 try {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected