Merge pull request #572 from ethereum/yann300-patch-15

Adapt to Metamask breaking change
pull/581/head
yann300 4 years ago committed by GitHub
commit 6a60793518
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