|
|
@ -60,13 +60,13 @@ initProvider({ |
|
|
|
// TODO:deprecate:2020
|
|
|
|
// TODO:deprecate:2020
|
|
|
|
// Setup web3
|
|
|
|
// Setup web3
|
|
|
|
|
|
|
|
|
|
|
|
if (typeof window.web3 !== 'undefined') { |
|
|
|
if (typeof window.web3 === 'undefined') { |
|
|
|
throw new Error(`MetaMask detected another web3.
|
|
|
|
// proxy web3, assign to window, and set up site auto reload
|
|
|
|
|
|
|
|
setupWeb3(log) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
log.warn(`MetaMask detected another web3.
|
|
|
|
MetaMask will not work reliably with another web3 extension. |
|
|
|
MetaMask will not work reliably with another web3 extension. |
|
|
|
This usually happens if you have two MetaMasks installed, |
|
|
|
This usually happens if you have two MetaMasks installed, |
|
|
|
or MetaMask and another web3 extension. Please remove one |
|
|
|
or MetaMask and another web3 extension. Please remove one |
|
|
|
and try again.`)
|
|
|
|
and try again.`)
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// proxy web3, assign to window, and set up site auto reload
|
|
|
|
|
|
|
|
setupWeb3(log) |
|
|
|
|
|
|
|