aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/popup.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-06-22 04:18:32 +0800
committerDan Finlay <dan@danfinlay.com>2016-06-22 04:18:32 +0800
commita08c3bc01b11fbd0e3a243359befbe9fc909edf4 (patch)
treeb79b7324139945c429ca4b6c74715d8040fdf4e1 /app/scripts/popup.js
parentf7f8f8b1c50be39db22a7b10c6c6db007fe590aa (diff)
downloadtangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.tar
tangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.tar.gz
tangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.tar.bz2
tangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.tar.lz
tangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.tar.xz
tangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.tar.zst
tangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.zip
Auto linted
Diffstat (limited to 'app/scripts/popup.js')
-rw-r--r--app/scripts/popup.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/scripts/popup.js b/app/scripts/popup.js
index 4fa6e1127..9e4051d05 100644
--- a/app/scripts/popup.js
+++ b/app/scripts/popup.js
@@ -19,7 +19,7 @@ async.parallel({
accountManager: connectToAccountManager,
}, setupApp)
-function connectToAccountManager(cb){
+function connectToAccountManager (cb) {
// setup communication with background
var pluginPort = chrome.runtime.connect({name: 'popup'})
var portStream = new PortStream(pluginPort)
@@ -30,7 +30,7 @@ function connectToAccountManager(cb){
setupWeb3Connection(mx.createStream('provider'))
}
-function setupWeb3Connection(stream){
+function setupWeb3Connection (stream) {
var remoteProvider = new StreamProvider()
remoteProvider.pipe(stream).pipe(remoteProvider)
stream.on('error', console.error.bind(console))
@@ -38,23 +38,23 @@ function setupWeb3Connection(stream){
global.web3 = new Web3(remoteProvider)
}
-function setupControllerConnection(stream, cb){
+function setupControllerConnection (stream, cb) {
var eventEmitter = new EventEmitter()
var background = Dnode({
- sendUpdate: function(state){
+ sendUpdate: function (state) {
eventEmitter.emit('update', state)
},
})
stream.pipe(background).pipe(stream)
- background.once('remote', function(accountManager){
+ background.once('remote', function (accountManager) {
// setup push events
accountManager.on = eventEmitter.on.bind(eventEmitter)
cb(null, accountManager)
})
}
-function getCurrentDomain(cb){
- chrome.tabs.query({active: true, currentWindow: true}, function(results){
+function getCurrentDomain (cb) {
+ chrome.tabs.query({active: true, currentWindow: true}, function (results) {
var activeTab = results[0]
var currentUrl = activeTab && activeTab.url
var currentDomain = url.parse(currentUrl).host
@@ -65,7 +65,7 @@ function getCurrentDomain(cb){
})
}
-function setupApp(err, opts){
+function setupApp (err, opts) {
if (err) {
alert(err.stack)
throw err