names more descriptive

This commit is contained in:
Gustavo Cortez 2014-03-21 10:24:44 -03:00
parent eae1589307
commit 3bd44e12a2
2 changed files with 5 additions and 5 deletions

View File

@ -31,7 +31,7 @@ exports.show = function(req, res, next) {
else { else {
return res.jsonp(a); return res.jsonp(a);
} }
}, req.query.getBalance); }, req.query.noTxList);
}; };

View File

@ -116,7 +116,7 @@ Address.prototype.getUtxo = function(next) {
}); });
}; };
Address.prototype.update = function(next, balance) { Address.prototype.update = function(next, notxlist) {
var self = this; var self = this;
if (!self.addrStr) return next(); if (!self.addrStr) return next();
@ -132,7 +132,7 @@ Address.prototype.update = function(next, balance) {
var v = txItem.value_sat; var v = txItem.value_sat;
if ( !seen[txItem.txid] ) { if ( !seen[txItem.txid] ) {
if (!balance) { if (!notxlist) {
txs.push({txid: txItem.txid, ts: txItem.ts}); txs.push({txid: txItem.txid, ts: txItem.ts});
} }
seen[txItem.txid]=1; seen[txItem.txid]=1;
@ -140,7 +140,7 @@ Address.prototype.update = function(next, balance) {
} }
if (txItem.spentTxId && !seen[txItem.spentTxId] ) { if (txItem.spentTxId && !seen[txItem.spentTxId] ) {
if (!balance) { if (!notxlist) {
txs.push({txid: txItem.spentTxId, ts: txItem.spentTs}); txs.push({txid: txItem.spentTxId, ts: txItem.spentTs});
} }
seen[txItem.spentTxId]=1; seen[txItem.spentTxId]=1;
@ -176,7 +176,7 @@ Address.prototype.update = function(next, balance) {
}, },
], function (err) { ], function (err) {
if (!balance) { if (!notxlist) {
// sort input and outputs togheter // sort input and outputs togheter
txs.sort( txs.sort(
function compare(a,b) { function compare(a,b) {