From 2b7ffbefc7afc0b09f9c1c8f52cb0f93d07e1455 Mon Sep 17 00:00:00 2001 From: pbca26 Date: Thu, 25 May 2017 21:29:45 +0300 Subject: [PATCH] sync only fix --- main.js | 8 ++++---- routes/shepherd.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index 97e5431..99c8334 100644 --- a/main.js +++ b/main.js @@ -42,11 +42,11 @@ if (os.platform() === 'linux') { // GUI APP settings and starting gui on address http://120.0.0.1:17777 var shepherd = require('./routes/shepherd'), - guiapp = express(); + guiapp = express(); shepherd.createIguanaDirs(); -const appSessionHash = md5(new Date(Date.now()).toLocaleString); +const appSessionHash = md5(Date.now()); shepherd.writeLog('app init ' + appSessionHash); shepherd.writeLog('app info: ' + appBasicInfo.name + ' ' + appBasicInfo.version); @@ -365,9 +365,9 @@ function createWindow (status) { if (appConfig.edexGuiOnly) { if (appConfig.v2) { shepherd.writeLog('show edex gui'); - mainWindow.loadURL('http://127.0.0.1:3000'); + // mainWindow.loadURL('http://127.0.0.1:3000'); mainWindow.appConfig = appConfig; - //mainWindow.appSessionHash = appSessionHash; + mainWindow.appSessionHash = appSessionHash; mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.agamaPort + '/gui/EasyDEX-GUI/react/build'); } else { shepherd.writeLog('show edex gui'); diff --git a/routes/shepherd.js b/routes/shepherd.js index c3ec409..93baf80 100644 --- a/routes/shepherd.js +++ b/routes/shepherd.js @@ -475,7 +475,7 @@ shepherd.getSyncOnlyForksInfo = function() { if (iguanaInstanceRegistry[port].mode.indexOf('/sync') > -1) { syncOnlyIguanaInstanceInfo[port] = {}; request({ - url: 'http://localhost:' + port + '/api/bitcoinrpc/getinfo?userpass=tmpIgRPCUser@1234', + url: 'http://localhost:' + port + '/api/bitcoinrpc/getinfo?userpass=tmpIgRPCUser@' + shepherd.appSessionHash, method: 'GET' }, function (error, response, body) { if (response && response.statusCode && response.statusCode === 200) { @@ -488,7 +488,7 @@ shepherd.getSyncOnlyForksInfo = function() { } }); request({ - url: 'http://localhost:' + port + '/api/SuperNET/activehandle?userpass=tmpIgRPCUser@1234', + url: 'http://localhost:' + port + '/api/SuperNET/activehandle?userpass=' + shepherd.appSessionHash, method: 'GET' }, function (error, response, body) { if (response && response.statusCode && response.statusCode === 200) {