Browse Source

main window dev switch

all-modes
pbca26 7 years ago
parent
commit
03bfa854d5
  1. 2
      gui/EasyDEX-GUI
  2. 8
      main.js
  3. 10
      routes/cache.js
  4. 2
      routes/shepherd.js

2
gui/EasyDEX-GUI

@ -1 +1 @@
Subproject commit 490ddb48a4472dfd9abf8792674a83688fdae0d3
Subproject commit 72c3a472674774be19dbd4a512b44e2fbc41d34d

8
main.js

@ -298,10 +298,14 @@ function createWindow (status) {
if (appConfig.edexGuiOnly) {
if (appConfig.v2) {
shepherd.writeLog('show edex gui');
mainWindow.loadURL('http://127.0.0.1:3000');
mainWindow.appConfig = appConfig;
mainWindow.appSessionHash = appSessionHash;
// mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.agamaPort + '/gui/EasyDEX-GUI/react/build');
if (appConfig.dev) {
mainWindow.loadURL('http://127.0.0.1:3000');
} else {
mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.agamaPort + '/gui/EasyDEX-GUI/react/build');
}
} else {
shepherd.writeLog('show edex gui');
mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.agamaPort + '/gui/EasyDEX-GUI/');

10
routes/cache.js

@ -514,6 +514,16 @@ cache.one = function(req, res, next) {
}
}
});
// basilisk balance fallback
const _parsedJSON = JSON.parse(body);
if (key === 'getbalance' &&
coin === 'KMD'/* &&
((_parsedJSON && _parsedJSON.balance === 0) || _parsedJSON === [])*/) {
console.log('fallback to kmd explorer');
//http://kmd.explorer.supernet.org/api/addr/RDbGxL8QYdEp8sMULaVZS2E6XThcTKT9Jd/?noTxList=1
}
outObj.basilisk[coin][address][key] = {};
outObj.basilisk[coin][address][key].data = JSON.parse(body);
outObj.basilisk[coin][address][key].timestamp = Date.now(); // add timestamp

2
routes/shepherd.js

@ -319,7 +319,7 @@ shepherd.post('/cli', function(req, res, next) {
};
}
res.end(JSON.stringify(responseObj));
res.end(JSON.stringify(responseObj));
});
}
});

Loading…
Cancel
Save