diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-11-22 02:51:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-22 02:51:04 +0800 |
commit | 66e0de73c5511b49e24b93667d49d0b4accd89e3 (patch) | |
tree | 425d3e92f4219d2aa96d47cb407d866ec39316f4 /development | |
parent | 80d09d019265ec5cf1c34ecf84cc07746e6bc04d (diff) | |
parent | e68008edf483cdf67a1a97a048fbbe610097d050 (diff) | |
download | tangerine-wallet-browser-66e0de73c5511b49e24b93667d49d0b4accd89e3.tar tangerine-wallet-browser-66e0de73c5511b49e24b93667d49d0b4accd89e3.tar.gz tangerine-wallet-browser-66e0de73c5511b49e24b93667d49d0b4accd89e3.tar.bz2 tangerine-wallet-browser-66e0de73c5511b49e24b93667d49d0b4accd89e3.tar.lz tangerine-wallet-browser-66e0de73c5511b49e24b93667d49d0b4accd89e3.tar.xz tangerine-wallet-browser-66e0de73c5511b49e24b93667d49d0b4accd89e3.tar.zst tangerine-wallet-browser-66e0de73c5511b49e24b93667d49d0b4accd89e3.zip |
Merge pull request #5334 from whymarrh/ui-switch
Default to the new UI for first time users
Diffstat (limited to 'development')
-rw-r--r-- | development/genStates.js | 7 | ||||
-rw-r--r-- | development/mock-dev.js | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/development/genStates.js b/development/genStates.js index 0ac1059be..15e0863e8 100644 --- a/development/genStates.js +++ b/development/genStates.js @@ -2,7 +2,7 @@ const fs = require('fs') const path = require('path') const promisify = require('pify') const enLocaleMessages = require('../app/_locales/en/messages.json') - +const writeFile = promisify(fs.writeFile) start().catch(console.error) @@ -12,8 +12,7 @@ async function start () { const states = {} await Promise.all(stateFilesNames.map(async (stateFileName) => { const stateFilePath = path.join(__dirname, 'states', stateFileName) - const stateFileContent = await promisify(fs.readFile)(stateFilePath, 'utf8') - const state = JSON.parse(stateFileContent) + const state = require(stateFilePath) state.localeMessages = { en: enLocaleMessages, current: {} } @@ -22,5 +21,5 @@ async function start () { })) const generatedFileContent = `module.exports = ${JSON.stringify(states)}` const generatedFilePath = path.join(__dirname, 'states.js') - await promisify(fs.writeFile)(generatedFilePath, generatedFileContent) + await writeFile(generatedFilePath, generatedFileContent) } diff --git a/development/mock-dev.js b/development/mock-dev.js index 15f6ad4bf..1af10a131 100644 --- a/development/mock-dev.js +++ b/development/mock-dev.js @@ -42,7 +42,7 @@ if (routerPath) { queryString = qs.parse(routerPath.split('?')[1]) } -selectedView = queryString.view || 'first time' +selectedView = queryString.view || 'send new ui' const firstState = states[selectedView] updateQueryParams(selectedView) |