From ad05df9e1c630994a25619e6d70033726ab0523d Mon Sep 17 00:00:00 2001 From: pbca26 Date: Thu, 16 Nov 2017 23:58:31 +0300 Subject: [PATCH] zcashparams verify promisified func --- main.js | 1 + routes/shepherd/downloadZcparams.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/main.js b/main.js index 1a80500..db96b97 100644 --- a/main.js +++ b/main.js @@ -387,6 +387,7 @@ function createWindow(status) { mainWindow.appSessionHash = appSessionHash; mainWindow.assetChainPorts = require('./routes/ports.js'); mainWindow.zcashParamsExist = _zcashParamsExist; + mainWindow.zcashParamsExistPromise = shepherd.zcashParamsExistPromise; mainWindow.agamaIcon = agamaIcon; mainWindow.testLocation = shepherd.testLocation; mainWindow.kmdMainPassiveMode = shepherd.kmdMainPassiveMode; diff --git a/routes/shepherd/downloadZcparams.js b/routes/shepherd/downloadZcparams.js index 831d5c1..0e520d3 100644 --- a/routes/shepherd/downloadZcparams.js +++ b/routes/shepherd/downloadZcparams.js @@ -54,6 +54,13 @@ module.exports = (shepherd) => { return _checkList; } + shepherd.zcashParamsExistPromise = () => { + return new shepherd.Promise((resolve, reject) => { + const _verify = shepherd.zcashParamsExist(); + resolve(_verify); + }); + }; + /* * Update bins * type: