aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-08-17 07:46:44 +0800
committerDan Finlay <dan@danfinlay.com>2016-08-17 07:46:44 +0800
commit030bdec27a95390207b9147c95b810893756db6d (patch)
tree459f0411c7f57b7ae86dce77a8dc71c55fef257b /ui
parent4ba90969ee8fa9b9e21e88f5c6f0d646874049a3 (diff)
downloadtangerine-wallet-browser-030bdec27a95390207b9147c95b810893756db6d.tar
tangerine-wallet-browser-030bdec27a95390207b9147c95b810893756db6d.tar.gz
tangerine-wallet-browser-030bdec27a95390207b9147c95b810893756db6d.tar.bz2
tangerine-wallet-browser-030bdec27a95390207b9147c95b810893756db6d.tar.lz
tangerine-wallet-browser-030bdec27a95390207b9147c95b810893756db6d.tar.xz
tangerine-wallet-browser-030bdec27a95390207b9147c95b810893756db6d.tar.zst
tangerine-wallet-browser-030bdec27a95390207b9147c95b810893756db6d.zip
Unify notification and popup ui files
Diffstat (limited to 'ui')
-rw-r--r--ui/notification.js52
1 files changed, 0 insertions, 52 deletions
diff --git a/ui/notification.js b/ui/notification.js
deleted file mode 100644
index 8cf74f6ee..000000000
--- a/ui/notification.js
+++ /dev/null
@@ -1,52 +0,0 @@
-const render = require('react-dom').render
-const h = require('react-hyperscript')
-const Root = require('./app/root')
-const actions = require('./app/actions')
-const configureStore = require('./app/store')
-
-module.exports = launchApp
-
-function launchApp (opts) {
- var accountManager = opts.accountManager
- actions._setAccountManager(accountManager)
-
- // check if we are unlocked first
- accountManager.getState(function (err, metamaskState) {
- if (err) throw err
- startApp(metamaskState, accountManager, opts)
- })
-}
-
-function startApp (metamaskState, accountManager, opts) {
- // parse opts
- var store = configureStore({
-
- // metamaskState represents the cross-tab state
- metamask: metamaskState,
-
- // appState represents the current tab's popup state
- appState: {
- currentDomain: opts.currentDomain,
- },
-
- // Which blockchain we are using:
- networkVersion: opts.networkVersion,
- })
-
- // if unconfirmed txs, start on txConf page
- if (Object.keys(metamaskState.unconfTxs || {}).length) {
- store.dispatch(actions.showConfTxPage())
- }
-
- accountManager.on('update', function (metamaskState) {
- store.dispatch(actions.updateMetamaskState(metamaskState))
- })
-
- // start app
- render(
- h(Root, {
- // inject initial state
- store: store,
- }
- ), opts.container)
-}