Skip to content

Commit

Permalink
dashboard update fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pbca26 committed Apr 1, 2018
1 parent 684afdc commit c24776d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
11 changes: 7 additions & 4 deletions routes/shepherd/dashboardUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module.exports = (shepherd) => {
_bitcoinRPC(
coin,
_type === 'public' ? 'getaddressesbyaccount' : 'z_listaddresses',
['']
_type === 'public' ? [''] : null
)
.then((_json) => {
if (_json === 'Work queue depth exceeded' ||
Expand Down Expand Up @@ -87,10 +87,13 @@ module.exports = (shepherd) => {
const filteredArray = json.filter(res => res.address === allAddrArray[a]).map(res => res.amount);

let isNewAddr = true;

for (let x = 0; x < result.length && isNewAddr; x++) {
for (let y = 0; y < result[x].length && isNewAddr; y++) {
if (allAddrArray[a] === result[x][y]) {
isNewAddr = false;
if (result[x]) {
for (let y = 0; y < result[x].length && isNewAddr; y++) {
if (allAddrArray[a] === result[x][y]) {
isNewAddr = false;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion routes/shepherd/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = (shepherd) => {
fs.readdir(rootLocation, (err, items) => {
for (let i = 0; i < items.length; i++) {
if (items[i].substr(0, 3) === 'gen') {
shepherd.log(`remove items[i]`);
shepherd.log(`remove ${items[i]}`);
fs.unlinkSync(rootLocation + items[i]);
}
}
Expand Down
4 changes: 2 additions & 2 deletions routes/shepherd/rpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ module.exports = (shepherd) => {
}

exec(`"${_coindCliBin}" ${_arg}`, (error, stdout, stderr) => {
//shepherd.log(`stdout: ${stdout}`);
//shepherd.log(`stderr: ${stderr}`);
// shepherd.log(`stdout: ${stdout}`);
// shepherd.log(`stderr: ${stderr}`);

if (error !== null) {
shepherd.log(`exec error: ${error}`);
Expand Down

0 comments on commit c24776d

Please sign in to comment.