aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/inpage.js
diff options
context:
space:
mode:
authorChi Kei Chan <chikeichan@gmail.com>2017-12-08 01:46:28 +0800
committerGitHub <noreply@github.com>2017-12-08 01:46:28 +0800
commit845aec82b976b1676c504832f152d6d9142c11e1 (patch)
treef6306a17629d68e217488ab15af7ce5029c07335 /app/scripts/inpage.js
parentbd5ce9461e5119c13ab8be29db5cdfc57228bac8 (diff)
parent2e9137dddd4abd07cc45caa670f09bdc9559bbbb (diff)
downloadtangerine-wallet-browser-845aec82b976b1676c504832f152d6d9142c11e1.tar.gz
tangerine-wallet-browser-845aec82b976b1676c504832f152d6d9142c11e1.tar.zst
tangerine-wallet-browser-845aec82b976b1676c504832f152d6d9142c11e1.zip
Merge branch 'NewUI-flat' into MM-333-auto-add-users-to-new-UI
Diffstat (limited to 'app/scripts/inpage.js')
-rw-r--r--app/scripts/inpage.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js
index b6889b00f..9261e7d64 100644
--- a/app/scripts/inpage.js
+++ b/app/scripts/inpage.js
@@ -31,6 +31,13 @@ var inpageProvider = new MetamaskInpageProvider(metamaskStream)
// 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)
web3.setProvider = function () {
log.debug('MetaMask - overrode web3.setProvider')