|
|
@ -31,6 +31,13 @@ var inpageProvider = new MetamaskInpageProvider(metamaskStream) |
|
|
|
// setup web3
|
|
|
|
// setup web3
|
|
|
|
//
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (typeof window.web3 !== 'undefined') { |
|
|
|
|
|
|
|
throw new Error(`MetaMask detected another web3.
|
|
|
|
|
|
|
|
MetaMask will not work reliably with another web3 extension. |
|
|
|
|
|
|
|
This usually happens if you have two MetaMasks installed, |
|
|
|
|
|
|
|
or MetaMask and another web3 extension. Please remove one |
|
|
|
|
|
|
|
and try again.`)
|
|
|
|
|
|
|
|
} |
|
|
|
var web3 = new Web3(inpageProvider) |
|
|
|
var web3 = new Web3(inpageProvider) |
|
|
|
web3.setProvider = function () { |
|
|
|
web3.setProvider = function () { |
|
|
|
log.debug('MetaMask - overrode web3.setProvider') |
|
|
|
log.debug('MetaMask - overrode web3.setProvider') |
|
|
|