aboutsummaryrefslogtreecommitdiffstats
path: root/ui/index.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2016-06-22 05:24:28 +0800
committerGitHub <noreply@github.com>2016-06-22 05:24:28 +0800
commit537328b5298a42f9d20862d42b9012babcda373c (patch)
tree9a5728447f5b23a918b4a23c12e91ea1b702e527 /ui/index.js
parentbb7788373d9c234313d651d88c72c18a8e4ca0aa (diff)
parentd7c3e8e9f5182576eb4a990d385ff8ce4ebd417c (diff)
downloadtangerine-wallet-browser-537328b5298a42f9d20862d42b9012babcda373c.tar
tangerine-wallet-browser-537328b5298a42f9d20862d42b9012babcda373c.tar.gz
tangerine-wallet-browser-537328b5298a42f9d20862d42b9012babcda373c.tar.bz2
tangerine-wallet-browser-537328b5298a42f9d20862d42b9012babcda373c.tar.lz
tangerine-wallet-browser-537328b5298a42f9d20862d42b9012babcda373c.tar.xz
tangerine-wallet-browser-537328b5298a42f9d20862d42b9012babcda373c.tar.zst
tangerine-wallet-browser-537328b5298a42f9d20862d42b9012babcda373c.zip
Merge pull request #303 from MetaMask/AutoLint
Auto lint
Diffstat (limited to 'ui/index.js')
-rw-r--r--ui/index.js19
1 files changed, 4 insertions, 15 deletions
diff --git a/ui/index.js b/ui/index.js
index d67c6f096..8cf74f6ee 100644
--- a/ui/index.js
+++ b/ui/index.js
@@ -1,28 +1,23 @@
-const React = require('react')
const render = require('react-dom').render
const h = require('react-hyperscript')
-const extend = require('xtend')
const Root = require('./app/root')
const actions = require('./app/actions')
const configureStore = require('./app/store')
module.exports = launchApp
-function launchApp(opts) {
-
+function launchApp (opts) {
var accountManager = opts.accountManager
actions._setAccountManager(accountManager)
// check if we are unlocked first
- accountManager.getState(function(err, metamaskState){
+ accountManager.getState(function (err, metamaskState) {
if (err) throw err
startApp(metamaskState, accountManager, opts)
})
-
}
-function startApp(metamaskState, accountManager, opts){
-
+function startApp (metamaskState, accountManager, opts) {
// parse opts
var store = configureStore({
@@ -43,12 +38,7 @@ function startApp(metamaskState, accountManager, opts){
store.dispatch(actions.showConfTxPage())
}
- // if unconfirmed messages, start on msgConf page
- if (Object.keys(metamaskState.unconfMsgs || {}).length) {
- store.dispatch(actions.showConfTxPage())
- }
-
- accountManager.on('update', function(metamaskState){
+ accountManager.on('update', function (metamaskState) {
store.dispatch(actions.updateMetamaskState(metamaskState))
})
@@ -59,5 +49,4 @@ function startApp(metamaskState, accountManager, opts){
store: store,
}
), opts.container)
-
}