Answers for "connect metamask with react app"

0

connect metamask with react app

async function connectMetamask() {
        window.ethereum.enable()
            .then(async (rs) => {
                setMyAccount(rs[0])
                let balance = await web3.current.eth.getBalance(accounts[0]);
                setBalance(web3.current.utils.fromWei(balance))
            })
    }
Posted by: Guest on October-29-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language