ensdomains / ensjs-v2

Javascript bindings for the Ethereum Name Service
208 stars 122 forks source link

pass provider to Web3 #35

Closed makoto closed 5 years ago

makoto commented 5 years ago

When I upgraded ensjs on http://dnssec.ens.domains to ver 0.7.5, then I started getting TypeError: Web3 is not a constructor (the code to replicate is here). This happens when the client app have web3 1.0.0-beta.48 installed even though ensjs itself still uses web3 1.0.0-beta.34. I am guessing some sort of global variable pollution where Web3 is overwritten. I think this simple change fixes the issue.