diff --git a/main.js b/main.js index 2cdbaee..6127e1f 100644 --- a/main.js +++ b/main.js @@ -131,6 +131,7 @@ let mainWindow; let loadingWindow; let appCloseWindow; let closeAppAfterLoading = false; +const _zcashParamsExist = shepherd.zcashParamsExist(); module.exports = guiapp; let iguanaIcon; @@ -304,7 +305,7 @@ function createWindow(status) { mainWindow.appBasicInfo = appBasicInfo; mainWindow.appSessionHash = appSessionHash; mainWindow.assetChainPorts = require('./routes/ports.js'); - mainWindow.zcashParamsExist = shepherd.zcashParamsExist(); + mainWindow.zcashParamsExist = _zcashParamsExist; mainWindow.iguanaIcon = iguanaIcon; if (appConfig.dev) { diff --git a/routes/shepherd.js b/routes/shepherd.js index 28b77d0..8cfc63d 100644 --- a/routes/shepherd.js +++ b/routes/shepherd.js @@ -135,9 +135,9 @@ shepherd.killRogueProcess = function(processName) { } shepherd.zcashParamsExist = function() { - if (fs.existsSync(zcashParamsDir) && - fs.existsSync(`${zcashParamsDir}/sprout-proving.key`) && - fs.existsSync(`${zcashParamsDir}/sprout-verifying.key`)) { + if (_fs.existsSync(zcashParamsDir) && + _fs.existsSync(`${zcashParamsDir}/sprout-proving.key`) && + _fs.existsSync(`${zcashParamsDir}/sprout-verifying.key`)) { console.log('zcashparams exist'); return true; }