I'm a fan of Open Source and have a growing interest in serverless and edge computing. I'm not a big fan of spiders, but they're doing good work eating bugs. I also stream on Twitch.
window.addEventListener("load",async()=>{// Modern dapp browsers...
if(window.ethereum){constweb3=newWeb3(window.ethereum)try{// Request account access if needed
awaitwindow.ethereum.enable()// Acccounts now exposed
resolve(web3)}catch(error){reject(error)}}// Legacy dapp browsers...
elseif(window.web3){// Use Mist/MetaMask's provider.
constweb3=window.web3console.log("Injected web3 detected.")resolve(web3)}// Fallback to localhost; use dev console port by default...
else{constprovider=newWeb3.providers.HttpProvider("localhost:8545")constweb3=newWeb3(provider)console.log("No web3 instance injected, using Local web3.")resolve(web3)}})
In that case a local gateway is used, probably either for development purposes, or even a wallet that starts such a gateway server locally, but doesn't directly connect with the browser via an extension (like in the first case).
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
TIL!
Code that illuminated me:
In that case a local gateway is used, probably either for development purposes, or even a wallet that starts such a gateway server locally, but doesn't directly connect with the browser via an extension (like in the first case).