From d017c2844165939f41613e1ae6141c8531422c44 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 27 Apr 2016 18:04:33 -0700 Subject: Filter transaction list for current blockchain network When starting up, we now create a `web3` inside the `background.js` process, which we pass to the `idStore` and ask for the current `network`. We include the `network` on `app.metamask.network` in the state object. We re-request the network when changing provider. We filter the transaction list for transactions that match the current network. --- app/scripts/popup.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'app/scripts/popup.js') diff --git a/app/scripts/popup.js b/app/scripts/popup.js index 6a39da661..e9ca7cd71 100644 --- a/app/scripts/popup.js +++ b/app/scripts/popup.js @@ -17,7 +17,7 @@ injectCss(css) async.parallel({ currentDomain: getCurrentDomain, accountManager: connectToAccountManager, -}, getNetworkVersion) +}, setupApp) function connectToAccountManager(cb){ // setup communication with background @@ -65,13 +65,6 @@ function getCurrentDomain(cb){ }) } -function getNetworkVersion(cb, results) { - web3.version.getNetwork(function(err, result) { - results.networkVersion = result - setupApp(err, results) - }) -} - function setupApp(err, opts){ if (err) { alert(err.stack) -- cgit v1.2.3