From b17a799de6b04e6971eb3a33e7baa76f8236cad9 Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 23 Oct 2017 12:10:49 -0700 Subject: [PATCH 01/43] Update network.js --- app/scripts/controllers/network.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/controllers/network.js b/app/scripts/controllers/network.js index 7f0cbd379..2259efaeb 100644 --- a/app/scripts/controllers/network.js +++ b/app/scripts/controllers/network.js @@ -53,7 +53,7 @@ module.exports = class NetworkController extends EventEmitter { lookupNetwork () { // Prevent firing when provider is not defined. if (!this.ethQuery || !this.ethQuery.sendAsync) { - return + return console.warn('NetworkController - lookupNetwork aborted due to missing ethQuery') } this.ethQuery.sendAsync({ method: 'net_version' }, (err, network) => { if (err) return this.setNetworkState('loading') From 5ce94e69b311428d9d2f9b5502c02d3b960e380e Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 31 Oct 2017 09:59:26 -0700 Subject: [PATCH 02/43] Add useful error when duplicate web3 is detected. Fixes #2507 --- CHANGELOG.md | 2 ++ app/scripts/inpage.js | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee9548606..968b8ab58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Current Master +- Detect when multiple web3 extensions are active, and provide useful error. + ## 3.12.0 2017-10-25 - Add support for alternative ENS TLDs (Ethereum Name Service Top-Level Domains). 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') From db321d95ccdfa059b42f6a068be50b91cfd8ed2b Mon Sep 17 00:00:00 2001 From: Dan Finlay <542863+danfinlay@users.noreply.github.com> Date: Fri, 17 Nov 2017 11:27:02 -0800 Subject: [PATCH 03/43] Point issue template at new support center --- ISSUE_TEMPLATE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ISSUE_TEMPLATE b/ISSUE_TEMPLATE index d0ff3c08e..b56d08d95 100644 --- a/ISSUE_TEMPLATE +++ b/ISSUE_TEMPLATE @@ -1,7 +1,7 @@