|
|
@ -253,6 +253,7 @@ shepherd.post('/native/dashboard/update', function(req, res, next) { |
|
|
|
}); |
|
|
|
})) |
|
|
|
.then(result => { |
|
|
|
if (result[0] && result[0].length) { |
|
|
|
function calcBalance(result, json) { |
|
|
|
if (json && |
|
|
|
json.length) { |
|
|
@ -281,12 +282,14 @@ shepherd.post('/native/dashboard/update', function(req, res, next) { |
|
|
|
} |
|
|
|
|
|
|
|
// remove addr duplicates
|
|
|
|
if (result[0]) { |
|
|
|
if (result[0] && |
|
|
|
result[0].length) { |
|
|
|
result[0] = result[0].filter(function(elem, pos) { |
|
|
|
return result[0].indexOf(elem) === pos; |
|
|
|
}); |
|
|
|
} |
|
|
|
if (result[1]) { |
|
|
|
if (result[1] && |
|
|
|
result[1].length) { |
|
|
|
result[1] = result[1].filter(function(elem, pos) { |
|
|
|
return result[1].indexOf(elem) === pos; |
|
|
|
}); |
|
|
@ -385,6 +388,19 @@ shepherd.post('/native/dashboard/update', function(req, res, next) { |
|
|
|
); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
_returnObj.addresses = { |
|
|
|
public: {}, |
|
|
|
private: {}, |
|
|
|
}; |
|
|
|
|
|
|
|
const returnObj = { |
|
|
|
msg: 'success', |
|
|
|
result: _returnObj, |
|
|
|
}; |
|
|
|
|
|
|
|
res.end(JSON.stringify(returnObj)); |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
@ -414,7 +430,7 @@ shepherd.post('/native/dashboard/update', function(req, res, next) { |
|
|
|
'Content-Type': 'application/json', |
|
|
|
}, |
|
|
|
body: JSON.stringify({ payload: _payload }), |
|
|
|
timeout: 10000, |
|
|
|
timeout: 60000, |
|
|
|
}; |
|
|
|
|
|
|
|
request(options, function(error, response, body) { |
|
|
@ -2882,7 +2898,7 @@ function herder(flock, data) { |
|
|
|
let _arg = `${coindACParam}${data.ac_options.join(' ')}${_customParam}`; |
|
|
|
_arg = _arg.trim().split(' '); |
|
|
|
execFile(`${komododBin}`, _arg, { |
|
|
|
maxBuffer: 1024 * 500000 // 500 mb
|
|
|
|
maxBuffer: 1024 * 1000000 // 1000 mb
|
|
|
|
}, function(error, stdout, stderr) { |
|
|
|
shepherd.writeLog(`stdout: ${stdout}`); |
|
|
|
shepherd.writeLog(`stderr: ${stderr}`); |
|
|
|