use-metamask icon indicating copy to clipboard operation
use-metamask copied to clipboard

TypeError: #<Object> is not a constructor

Open chackerian opened this issue 2 years ago • 1 comments

I'm getting this error the first time using this package. I'm using the ethers Web3Interface

TypeError: #<Object> is not a constructor
    at _construct (useMetamask.js:18:1)
    at _callee$ (useMetamask.js:137:1)
    at tryCatch (runtime.js:63:1)
    at Generator.invoke [as _invoke] (runtime.js:294:1)
    at Generator.next (runtime.js:119:1)
    at asyncGeneratorStep (useMetamask.js:32:1)
    at _next (useMetamask.js:34:1)
    at useMetamask.js:34:1
    at new Promise (<anonymous>)
    at useMetamask.js:34:1

How can I resolve this issue?

chackerian avatar Mar 26 '22 20:03 chackerian

@chackerian await connect(ethers.providers.Web3Provider);

hveveris avatar Jul 06 '22 07:07 hveveris

Seems like it resolved, I am closing this issue, please re-open if reply above didn't help.

mdtanrikulu avatar Dec 03 '22 18:12 mdtanrikulu