Browse Source

switched zcashparams check fs to graceful-fs

all-modes
pbca26 8 years ago
parent
commit
decec36889
  1. 3
      main.js
  2. 6
      routes/shepherd.js

3
main.js

@ -131,6 +131,7 @@ let mainWindow;
let loadingWindow; let loadingWindow;
let appCloseWindow; let appCloseWindow;
let closeAppAfterLoading = false; let closeAppAfterLoading = false;
const _zcashParamsExist = shepherd.zcashParamsExist();
module.exports = guiapp; module.exports = guiapp;
let iguanaIcon; let iguanaIcon;
@ -304,7 +305,7 @@ function createWindow(status) {
mainWindow.appBasicInfo = appBasicInfo; mainWindow.appBasicInfo = appBasicInfo;
mainWindow.appSessionHash = appSessionHash; mainWindow.appSessionHash = appSessionHash;
mainWindow.assetChainPorts = require('./routes/ports.js'); mainWindow.assetChainPorts = require('./routes/ports.js');
mainWindow.zcashParamsExist = shepherd.zcashParamsExist(); mainWindow.zcashParamsExist = _zcashParamsExist;
mainWindow.iguanaIcon = iguanaIcon; mainWindow.iguanaIcon = iguanaIcon;
if (appConfig.dev) { if (appConfig.dev) {

6
routes/shepherd.js

@ -135,9 +135,9 @@ shepherd.killRogueProcess = function(processName) {
} }
shepherd.zcashParamsExist = function() { shepherd.zcashParamsExist = function() {
if (fs.existsSync(zcashParamsDir) && if (_fs.existsSync(zcashParamsDir) &&
fs.existsSync(`${zcashParamsDir}/sprout-proving.key`) && _fs.existsSync(`${zcashParamsDir}/sprout-proving.key`) &&
fs.existsSync(`${zcashParamsDir}/sprout-verifying.key`)) { _fs.existsSync(`${zcashParamsDir}/sprout-verifying.key`)) {
console.log('zcashparams exist'); console.log('zcashparams exist');
return true; return true;
} }

Loading…
Cancel
Save