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