aboutsummaryrefslogtreecommitdiffstats
path: root/ui/index.js
diff options
context:
space:
mode:
authorDan Finlay <542863+danfinlay@users.noreply.github.com>2019-08-07 05:53:50 +0800
committerGitHub <noreply@github.com>2019-08-07 05:53:50 +0800
commitdb08881d4527e8a037f401ef22b849e52152864f (patch)
tree6032d7a4ae67371889eece1d8490c26d5a119dd5 /ui/index.js
parent4139019d0f4dd83f56da400ca7e0e6d1976d1716 (diff)
parent86ad9564a064fd6158dab6a3c9e5b10614ef6e68 (diff)
downloadtangerine-wallet-browser-db08881d4527e8a037f401ef22b849e52152864f.tar
tangerine-wallet-browser-db08881d4527e8a037f401ef22b849e52152864f.tar.gz
tangerine-wallet-browser-db08881d4527e8a037f401ef22b849e52152864f.tar.bz2
tangerine-wallet-browser-db08881d4527e8a037f401ef22b849e52152864f.tar.lz
tangerine-wallet-browser-db08881d4527e8a037f401ef22b849e52152864f.tar.xz
tangerine-wallet-browser-db08881d4527e8a037f401ef22b849e52152864f.tar.zst
tangerine-wallet-browser-db08881d4527e8a037f401ef22b849e52152864f.zip
Merge pull request #6969 from MetaMask/developv7.0.0
Master Version Bump
Diffstat (limited to 'ui/index.js')
-rw-r--r--ui/index.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/ui/index.js b/ui/index.js
index ac860e0db..db9292761 100644
--- a/ui/index.js
+++ b/ui/index.js
@@ -12,19 +12,19 @@ module.exports = launchMetamaskUi
log.setLevel(global.METAMASK_DEBUG ? 'debug' : 'warn')
function launchMetamaskUi (opts, cb) {
- var accountManager = opts.accountManager
- actions._setBackgroundConnection(accountManager)
+ var {backgroundConnection} = opts
+ actions._setBackgroundConnection(backgroundConnection)
// check if we are unlocked first
- accountManager.getState(function (err, metamaskState) {
+ backgroundConnection.getState(function (err, metamaskState) {
if (err) return cb(err)
- startApp(metamaskState, accountManager, opts)
+ startApp(metamaskState, backgroundConnection, opts)
.then((store) => {
cb(null, store)
})
})
}
-async function startApp (metamaskState, accountManager, opts) {
+async function startApp (metamaskState, backgroundConnection, opts) {
// parse opts
if (!metamaskState.featureFlags) metamaskState.featureFlags = {}
@@ -34,6 +34,7 @@ async function startApp (metamaskState, accountManager, opts) {
const enLocaleMessages = await fetchLocale('en')
const store = configureStore({
+ activeTab: opts.activeTab,
// metamaskState represents the cross-tab state
metamask: metamaskState,
@@ -59,7 +60,7 @@ async function startApp (metamaskState, accountManager, opts) {
}))
}
- accountManager.on('update', function (metamaskState) {
+ backgroundConnection.on('update', function (metamaskState) {
store.dispatch(actions.updateMetamaskState(metamaskState))
})
@@ -79,7 +80,7 @@ async function startApp (metamaskState, accountManager, opts) {
// inject initial state
store: store,
}
- ), opts.container)
+ ), opts.container)
return store
}