mirror of https://github.com/BTCPrivate/z-nomp.git
Update api.js
Add blocks api call. Add immature balance to api.
This commit is contained in:
parent
589ec86400
commit
9911037d1b
|
@ -22,6 +22,12 @@ module.exports = function(logger, portalConfig, poolConfigs){
|
|||
res.header('Content-Type', 'application/json');
|
||||
res.end(JSON.stringify(portalStats.statPoolHistory));
|
||||
return;
|
||||
case 'blocks':
|
||||
portalStats.getBlocks(function(data){
|
||||
res.header('Content-Type', 'application/json');
|
||||
res.end(JSON.stringify(data));
|
||||
});
|
||||
break;
|
||||
case 'payments':
|
||||
var poolBlocks = [];
|
||||
for(var pool in portalStats.stats.pools) {
|
||||
|
@ -82,7 +88,7 @@ module.exports = function(logger, portalConfig, poolConfigs){
|
|||
}
|
||||
}
|
||||
}
|
||||
res.end(JSON.stringify({miner: address, totalHash: totalHash, totalShares: totalShares, networkSols: networkSols, balance: balances.totalHeld, paid: balances.totalPaid, workers: workers, history: history}));
|
||||
res.end(JSON.stringify({miner: address, totalHash: totalHash, totalShares: totalShares, networkSols: networkSols, immature: balances.totalImmature, balance: balances.totalHeld, paid: balances.totalPaid, workers: workers, history: history}));
|
||||
});
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue