aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-04-20 09:21:28 +0800
committerDan Finlay <dan@danfinlay.com>2016-04-20 09:21:28 +0800
commitf79601ee58a07ec6275d4588845578795f550d84 (patch)
tree5ce3e35ec1cb6b97ae94c2de1d80bd39dbe3fa42 /app
parentb8c57433ce0f6a50318671912b02082e12a0ecb0 (diff)
downloadtangerine-wallet-browser-f79601ee58a07ec6275d4588845578795f550d84.tar
tangerine-wallet-browser-f79601ee58a07ec6275d4588845578795f550d84.tar.gz
tangerine-wallet-browser-f79601ee58a07ec6275d4588845578795f550d84.tar.bz2
tangerine-wallet-browser-f79601ee58a07ec6275d4588845578795f550d84.tar.lz
tangerine-wallet-browser-f79601ee58a07ec6275d4588845578795f550d84.tar.xz
tangerine-wallet-browser-f79601ee58a07ec6275d4588845578795f550d84.tar.zst
tangerine-wallet-browser-f79601ee58a07ec6275d4588845578795f550d84.zip
Generate explorer link to match current blockchain
Diffstat (limited to 'app')
-rw-r--r--app/scripts/popup.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/scripts/popup.js b/app/scripts/popup.js
index 85b3e30f9..6a39da661 100644
--- a/app/scripts/popup.js
+++ b/app/scripts/popup.js
@@ -17,7 +17,7 @@ injectCss(css)
async.parallel({
currentDomain: getCurrentDomain,
accountManager: connectToAccountManager,
-}, setupApp)
+}, getNetworkVersion)
function connectToAccountManager(cb){
// setup communication with background
@@ -65,6 +65,13 @@ 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)
@@ -78,6 +85,6 @@ function setupApp(err, opts){
container: container,
accountManager: opts.accountManager,
currentDomain: opts.currentDomain,
+ networkVersion: opts.networkVersion,
})
-
}