mirror of https://github.com/BTCPrivate/z-nomp.git
Precision bugfix and validate wallet addresses
This commit is contained in:
parent
661695b1cf
commit
f00a52f8e0
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue