diff options
author | kumavis <aaron@kumavis.me> | 2018-03-12 10:06:14 +0800 |
---|---|---|
committer | kumavis <aaron@kumavis.me> | 2018-03-12 10:06:14 +0800 |
commit | ecb792ae502dcacf168fb288ef0f2623e599eb78 (patch) | |
tree | 63c1972be6ca78e3d0d0ddcd9a7dc5784820da52 /development | |
parent | 07fa26d1f094a7a405107c5f31674e65c94cea8d (diff) | |
download | tangerine-wallet-browser-ecb792ae502dcacf168fb288ef0f2623e599eb78.tar.gz tangerine-wallet-browser-ecb792ae502dcacf168fb288ef0f2623e599eb78.tar.zst tangerine-wallet-browser-ecb792ae502dcacf168fb288ef0f2623e599eb78.zip |
genStates - fix fs api calls
Diffstat (limited to 'development')
-rw-r--r-- | development/genStates.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/development/genStates.js b/development/genStates.js index 325ef71f3..d92e2bc2e 100644 --- a/development/genStates.js +++ b/development/genStates.js @@ -6,11 +6,11 @@ start().catch(console.error) async function start () { const statesPath = path.join(__dirname, 'states') - const stateFilesNames = await promisify(fs.readdirSync)(statesPath) + const stateFilesNames = await promisify(fs.readdir)(statesPath) const states = {} await Promise.all(stateFilesNames.map(async (stateFileName) => { const stateFilePath = path.join(__dirname, 'states', stateFileName) - const stateFileContent = await promisify(fs.readFileSync)(stateFilePath, 'utf8') + const stateFileContent = await promisify(fs.readFile)(stateFilePath, 'utf8') const state = JSON.parse(stateFileContent) const stateName = stateFileName.split('.')[0].replace(/-/g, ' ', 'g') states[stateName] = state |