Adapt to Metamask breaking change

yann300-patch-15
yann300 4 years ago committed by GitHub
parent b6aa14a6cc
commit 9d09c55989
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      libs/remix-lib/src/execution/execution-context.js

@ -12,8 +12,8 @@ const LogsManager = require('./logsManager.js')
const rlp = ethUtil.rlp
let web3
if (typeof window !== 'undefined' && typeof window.web3 !== 'undefined') {
var injectedProvider = window.web3.currentProvider
if (typeof window !== 'undefined' && typeof window.ethereum !== 'undefined') {
var injectedProvider = window.ethereum
web3 = new Web3(injectedProvider)
} else {
web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'))

Loading…
Cancel
Save