aboutsummaryrefslogtreecommitdiffstats
path: root/ui/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/index.js')
-rw-r--r--ui/index.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/ui/index.js b/ui/index.js
index fdb2f23e0..c680accfe 100644
--- a/ui/index.js
+++ b/ui/index.js
@@ -4,6 +4,7 @@ const Root = require('./app/root')
const actions = require('./app/actions')
const configureStore = require('./app/store')
const txHelper = require('./lib/tx-helper')
+const { fetchLocale } = require('./i18n-helper').getMessage
const { OLD_UI_NETWORK_TYPE, BETA_UI_NETWORK_TYPE } = require('../app/scripts/config').enums
global.log = require('loglevel')
@@ -18,14 +19,17 @@ function launchMetamaskUi (opts, cb) {
// check if we are unlocked first
accountManager.getState(function (err, metamaskState) {
if (err) return cb(err)
- const store = startApp(metamaskState, accountManager, opts)
- cb(null, store)
+ startApp(metamaskState, accountManager, opts.localeMessages, opts)
+ .then((store) => {
+ cb(null, store)
+ })
})
}
-function startApp (metamaskState, accountManager, opts) {
+async function startApp (metamaskState, accountManager, currentLocaleMessages, opts) {
// parse opts
if (!metamaskState.featureFlags) metamaskState.featureFlags = {}
+
const store = configureStore({
// metamaskState represents the cross-tab state
@@ -34,6 +38,8 @@ function startApp (metamaskState, accountManager, opts) {
// appState represents the current tab's popup state
appState: {},
+ localeMessages: currentLocaleMessages,
+
// Which blockchain we are using:
networkVersion: opts.networkVersion,
})