make 0 confirmations work
This commit is contained in:
parent
e15473f625
commit
2dc79efc0d
@ -496,11 +496,16 @@ AddressModule.prototype.getAddressHistoryForAddress = function(address, queryMem
|
|||||||
return callback(err);
|
return callback(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var confirmations = 0;
|
||||||
|
if(transaction.__height >= 0) {
|
||||||
|
confirmations = self.db.chain.tip.__height - transaction.__height;
|
||||||
|
}
|
||||||
|
|
||||||
txinfos[transaction.hash] = {
|
txinfos[transaction.hash] = {
|
||||||
address: address,
|
address: address,
|
||||||
satoshis: 0,
|
satoshis: 0,
|
||||||
height: transaction.__height,
|
height: transaction.__height,
|
||||||
confirmations: self.db.chain.tip.__height - transaction.__height + 1,
|
confirmations: confirmations,
|
||||||
timestamp: transaction.__timestamp,
|
timestamp: transaction.__timestamp,
|
||||||
fees: transaction.getFee(),
|
fees: transaction.getFee(),
|
||||||
outputIndexes: [],
|
outputIndexes: [],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user