aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-20 00:06:16 +0800
committerDan <danjm.com@gmail.com>2018-03-20 00:06:16 +0800
commita51e8f6a165163b9cc37a4eb5b315cd37af17f77 (patch)
tree856677d695259bf97b3dae29403fd5de7db7cfd9 /ui
parent5fe0be722b6514692a68e920ee8058c5d572237d (diff)
downloadtangerine-wallet-browser-a51e8f6a165163b9cc37a4eb5b315cd37af17f77.tar
tangerine-wallet-browser-a51e8f6a165163b9cc37a4eb5b315cd37af17f77.tar.gz
tangerine-wallet-browser-a51e8f6a165163b9cc37a4eb5b315cd37af17f77.tar.bz2
tangerine-wallet-browser-a51e8f6a165163b9cc37a4eb5b315cd37af17f77.tar.lz
tangerine-wallet-browser-a51e8f6a165163b9cc37a4eb5b315cd37af17f77.tar.xz
tangerine-wallet-browser-a51e8f6a165163b9cc37a4eb5b315cd37af17f77.tar.zst
tangerine-wallet-browser-a51e8f6a165163b9cc37a4eb5b315cd37af17f77.zip
Fetch localeMessages in front end only.
Diffstat (limited to 'ui')
-rw-r--r--ui/index.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/index.js b/ui/index.js
index c680accfe..598d2876b 100644
--- a/ui/index.js
+++ b/ui/index.js
@@ -4,7 +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 { fetchLocale } = require('./i18n-helper')
const { OLD_UI_NETWORK_TYPE, BETA_UI_NETWORK_TYPE } = require('../app/scripts/config').enums
global.log = require('loglevel')
@@ -19,17 +19,19 @@ function launchMetamaskUi (opts, cb) {
// check if we are unlocked first
accountManager.getState(function (err, metamaskState) {
if (err) return cb(err)
- startApp(metamaskState, accountManager, opts.localeMessages, opts)
+ startApp(metamaskState, accountManager, opts)
.then((store) => {
cb(null, store)
})
})
}
-async function startApp (metamaskState, accountManager, currentLocaleMessages, opts) {
+async function startApp (metamaskState, accountManager, opts) {
// parse opts
if (!metamaskState.featureFlags) metamaskState.featureFlags = {}
+ const currentLocaleMessages = await fetchLocale(metamaskState.currentLocale)
+
const store = configureStore({
// metamaskState represents the cross-tab state