Browse Source

expose assetchain ports on window

all-modes
pbca26 8 years ago
parent
commit
b8cab130a1
  1. 1
      main.js
  2. 2
      routes/ports.js
  3. 13
      routes/shepherd.js

1
main.js

@ -318,6 +318,7 @@ function createWindow (status) {
mainWindow.appConfig = appConfig;
mainWindow.appBasicInfo = appBasicInfo;
mainWindow.appSessionHash = appSessionHash;
mainWindow.assetChainPorts = require('./routes/ports.js');
mainWindow.zcashParamsExist = shepherd.zcashParamsExist();
if (appConfig.dev) {

2
routes/ports.js

@ -8,7 +8,7 @@ const assetChainPorts = {
'JUMBLR': '15106',
'BET': '14250',
'CRYPTO': '8516',
'HODL': '14431',
'HODL': '8010',
'SHARK': '10114',
'BOTS': '11964',
'MGW': '12386',

13
routes/shepherd.js

@ -49,7 +49,7 @@ if (os.platform() === 'darwin') {
komodoDir = `${process.env.HOME}/Library/Application Support/Komodo`,
zcashdBin = '/Applications/ZCashSwingWalletUI.app/Contents/MacOS/zcashd',
zcashcliBin = '/Applications/ZCashSwingWalletUI.app/Contents/MacOS/zcash-cli',
zcashDir = `${process.env.HOME}/Library/Application Support/Zcash`;
zcashDir = `${process.env.HOME}/Library/Application Support/ZcashParams`;
}
if (os.platform() === 'linux') {
@ -1789,6 +1789,7 @@ function herder(flock, data) {
}
// TODO: notify gui that reindex/rescan param is used to reflect on the screen
// asset chain debug.log unlink
if (flock === 'komodod') {
let kmdDebugLogLocation = (data.ac_name !== 'komodod' ? komodoDir + '/' + data.ac_name : komodoDir) + '/debug.log';
@ -1804,9 +1805,13 @@ function herder(flock, data) {
console.log(`error accessing ${kmdDebugLogLocation}`);
shepherd.writeLog(`error accessing ${kmdDebugLogLocation}`);
} else {
console.log(`truncate ${kmdDebugLogLocation}`);
shepherd.writeLog(`truncate ${kmdDebugLogLocation}`);
fs.unlink(kmdDebugLogLocation);
try {
fs.unlink(kmdDebugLogLocation);
console.log(`truncate ${kmdDebugLogLocation}`);
shepherd.writeLog(`truncate ${kmdDebugLogLocation}`);
} catch (e) {
console.log('cant unlink debug.log');
}
}
});
} catch(e) {

Loading…
Cancel
Save