Precision bugfix and validate wallet addresses

This commit is contained in:
joshuayabut 2016-12-19 02:28:59 +00:00
parent 661695b1cf
commit f00a52f8e0
1 changed files with 2 additions and 2 deletions

View File

@ -149,7 +149,7 @@ function SetupForPool(logger, poolOptions, setupFinished){
setupFinished(true); setupFinished(true);
} }
async.parallel([validateAddress, getBalance], asyncComplete); async.parallel([validateAddress, validateTAddress, validateZAddress, getBalance], asyncComplete);
//get t_address coinbalance //get t_address coinbalance
function listUnspent (addr, minConf, callback) { function listUnspent (addr, minConf, callback) {
@ -164,7 +164,7 @@ function SetupForPool(logger, poolOptions, setupFinished){
else { else {
var tBalance = 0; var tBalance = 0;
for (var i = 0, len = result[0].response.length; i < len; i++) { for (var i = 0, len = result[0].response.length; i < len; i++) {
tBalance = tBalance + Number((result[0].response[i].amount * magnitude)); tBalance = tBalance + result[0].response[i].amount * magnitude;
} }
logger.debug(logSystem, logComponent, addr + ' contains a balance of: ' + (tBalance / magnitude)); logger.debug(logSystem, logComponent, addr + ' contains a balance of: ' + (tBalance / magnitude));
callback(null, tBalance); callback(null, tBalance);