Browse Source

Merge pull request #115 from pbca26/master

app
all-modes
pbca26 8 years ago
committed by GitHub
parent
commit
61ea41ee15
  1. 2
      gui/init.js
  2. 18
      main.js
  3. 2
      routes/cache.js
  4. 12
      routes/shepherd.js

2
gui/init.js

@ -26,7 +26,7 @@ $(document).ready(function() {
if (result !== 'error') {
stopcheck();
if (appConf && appConf.forks && appConf.forks.basilisk) {
if (appConf && appConf.useBasiliskInstance) {
StartIguana_Cache();
}

18
main.js

@ -148,12 +148,12 @@ guiapp.use('/shepherd', shepherd);
var server = require('http').createServer(guiapp),
io = require('socket.io').listen(server);
server.listen(appConfig.iguanaAppPort, function() {
console.log('guiapp and sockets.io are listening on port ' + appConfig.iguanaAppPort + '!');
shepherd.writeLog('guiapp and sockets.io are listening on port ' + appConfig.iguanaAppPort + '!');
server.listen(appConfig.agamaPort, function() {
console.log('guiapp and sockets.io are listening on port ' + appConfig.agamaPort + '!');
shepherd.writeLog('guiapp and sockets.io are listening on port ' + appConfig.agamaPort + '!');
});
io.set('origins', appConfig.dev ? 'http://127.0.0.1:3000' : 'http://127.0.0.1:' + appConfig.iguanaAppPort); // set origin
io.set('origins', appConfig.dev ? 'http://127.0.0.1:3000' : 'http://127.0.0.1:' + appConfig.agamaPort); // set origin
io.on('connection', function(client) {
console.log('EDEX GUI is connected...');
@ -252,7 +252,7 @@ function createLoadingWindow() {
loadingWindow.createWindow = createWindow; // expose createWindow to front-end scripts
// load our index.html (i.e. easyDEX GUI)
loadingWindow.loadURL('http://' + appConfig.host + ':' + appConfig.iguanaAppPort + '/gui/');
loadingWindow.loadURL('http://' + appConfig.host + ':' + appConfig.agamaPort + '/gui/');
shepherd.writeLog('show loading window');
// DEVTOOLS - only for dev purposes - ca333
@ -366,13 +366,15 @@ function createWindow (status) {
if (appConfig.v2) {
shepherd.writeLog('show edex gui');
mainWindow.loadURL('http://127.0.0.1:3000');
//mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.iguanaAppPort + '/gui/EasyDEX-GUI/react/build');
mainWindow.appConfig = appConfig;
mainWindow.appSessionHash = appSessionHash;
//mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.agamaPort + '/gui/EasyDEX-GUI/react/build');
} else {
shepherd.writeLog('show edex gui');
mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.iguanaAppPort + '/gui/EasyDEX-GUI/');
mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.agamaPort + '/gui/EasyDEX-GUI/');
}
} else {
mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.iguanaAppPort + '/gui/main.html');
mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.agamaPort + '/gui/main.html');
}
mainWindow.webContents.on('context-menu', (e, params) => { //context-menu returns params

2
routes/cache.js

@ -429,7 +429,7 @@ cache.one = function(req, res, next) {
'listunspent': 'http://' + cache.appConfig.host + ':' + iguanaCorePort + '/api/dex/listunspent?userpass=' + sessionKey + '&symbol=' + coin + '&address=' + address,
'listtransactions': 'http://' + cache.appConfig.host + ':' + iguanaCorePort + '/api/dex/listtransactions?userpass=' + sessionKey + '&count=100&skip=0&symbol=' + coin + '&address=' + address,
'getbalance': 'http://' + cache.appConfig.host + ':' + iguanaCorePort + '/api/dex/getbalance?userpass=' + sessionKey + '&symbol=' + coin + '&address=' + address,
'refresh': 'http://' + cache.appConfig.host + ':' + iguanaCorePort + '/api/basilisk/refresh?userpass=' + sessionKey + '&timeout=600000&symbol=' + coin + '&address=' + address
'refresh': 'http://' + cache.appConfig.host + ':' + iguanaCorePort + '/api/basilisk/refresh?userpass=' + sessionKey + '&symbol=' + coin + '&address=' + address
},
_dexUrls = {};

12
routes/shepherd.js

@ -81,10 +81,10 @@ shepherd.appConfig = {
"edexGuiOnly": true,
"iguanaGuiOnly": false,
"manualIguanaStart": false,
"skipBasiliskNetworkCheck": false,
"skipBasiliskNetworkCheck": true,
"minNotaries": 8,
"host": "127.0.0.1",
"iguanaAppPort": 17777,
"agamaPort": 17777,
"iguanaCorePort": 7778,
"maxDescriptors": {
"darwin": 90000,
@ -93,10 +93,8 @@ shepherd.appConfig = {
"killIguanaOnStart": true,
"dev": false,
"v2": true,
"forks": {
"basilisk": true,
"all": false
}
"useBasiliskInstance": true,
"debug": true,
};
shepherd.writeLog = function(data) {
@ -276,7 +274,7 @@ shepherd.quitKomodod = function(chain) {
exec(komodocliBin + (chain ? ' ac_name=' + chain : '') + ' stop', function(error, stdout, stderr) {
console.log('stdout: ' + stdout)
console.log('stderr: ' + stderr)
if (error !== null) {
console.log('exec error: ' + error)
}

Loading…
Cancel
Save