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. 10
      routes/shepherd.js

2
gui/init.js

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

18
main.js

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

10
routes/shepherd.js

@ -81,10 +81,10 @@ shepherd.appConfig = {
"edexGuiOnly": true, "edexGuiOnly": true,
"iguanaGuiOnly": false, "iguanaGuiOnly": false,
"manualIguanaStart": false, "manualIguanaStart": false,
"skipBasiliskNetworkCheck": false, "skipBasiliskNetworkCheck": true,
"minNotaries": 8, "minNotaries": 8,
"host": "127.0.0.1", "host": "127.0.0.1",
"iguanaAppPort": 17777, "agamaPort": 17777,
"iguanaCorePort": 7778, "iguanaCorePort": 7778,
"maxDescriptors": { "maxDescriptors": {
"darwin": 90000, "darwin": 90000,
@ -93,10 +93,8 @@ shepherd.appConfig = {
"killIguanaOnStart": true, "killIguanaOnStart": true,
"dev": false, "dev": false,
"v2": true, "v2": true,
"forks": { "useBasiliskInstance": true,
"basilisk": true, "debug": true,
"all": false
}
}; };
shepherd.writeLog = function(data) { shepherd.writeLog = function(data) {

Loading…
Cancel
Save