aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2016-09-13 12:30:04 +0800
committerkumavis <aaron@kumavis.me>2016-09-13 12:30:04 +0800
commit8a5007a396cff02b15fb85c3ed910e14cf71d59c (patch)
tree5b6c6afdbb4f2c4cc9375034d35fd9a6f6940d59 /app/scripts
parent5126ddaf0c25d243c625adff82dc95273acf1291 (diff)
downloadtangerine-wallet-browser-8a5007a396cff02b15fb85c3ed910e14cf71d59c.tar
tangerine-wallet-browser-8a5007a396cff02b15fb85c3ed910e14cf71d59c.tar.gz
tangerine-wallet-browser-8a5007a396cff02b15fb85c3ed910e14cf71d59c.tar.bz2
tangerine-wallet-browser-8a5007a396cff02b15fb85c3ed910e14cf71d59c.tar.lz
tangerine-wallet-browser-8a5007a396cff02b15fb85c3ed910e14cf71d59c.tar.xz
tangerine-wallet-browser-8a5007a396cff02b15fb85c3ed910e14cf71d59c.tar.zst
tangerine-wallet-browser-8a5007a396cff02b15fb85c3ed910e14cf71d59c.zip
ui - remove unused currentDomain prop
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/popup.js19
1 files changed, 2 insertions, 17 deletions
diff --git a/app/scripts/popup.js b/app/scripts/popup.js
index 096b56115..c7145bdd8 100644
--- a/app/scripts/popup.js
+++ b/app/scripts/popup.js
@@ -1,4 +1,3 @@
-const url = require('url')
const EventEmitter = require('events').EventEmitter
const async = require('async')
const Dnode = require('dnode')
@@ -18,7 +17,6 @@ var css = MetaMaskUiCss()
injectCss(css)
async.parallel({
- currentDomain: getCurrentDomain,
accountManager: connectToAccountManager,
}, setupApp)
@@ -46,6 +44,8 @@ function setupWeb3Connection (stream) {
}
function setupControllerConnection (stream, cb) {
+ // this is a really sneaky way of adding EventEmitter api
+ // to a bi-directional dnode instance
var eventEmitter = new EventEmitter()
var background = Dnode({
sendUpdate: function (state) {
@@ -60,20 +60,6 @@ function setupControllerConnection (stream, cb) {
})
}
-function getCurrentDomain (cb) {
- const unknown = '<unknown>'
- if (!extension.tabs) return cb(null, unknown)
- extension.tabs.query({active: true, currentWindow: true}, function (results) {
- var activeTab = results[0]
- var currentUrl = activeTab && activeTab.url
- var currentDomain = url.parse(currentUrl).host
- if (!currentUrl) {
- return cb(null, unknown)
- }
- cb(null, currentDomain)
- })
-}
-
function setupApp (err, opts) {
if (err) {
alert(err.stack)
@@ -85,7 +71,6 @@ function setupApp (err, opts) {
MetaMaskUi({
container: container,
accountManager: opts.accountManager,
- currentDomain: opts.currentDomain,
networkVersion: opts.networkVersion,
})
}