This commit is contained in:
sairajzero 2023-01-28 21:03:56 +05:30
parent 6e9f946607
commit c32a7cb57a

View File

@ -202,8 +202,6 @@ AddressService.prototype.getAddressHistory = function(addresses, options, stream
self._streamAddressSummary(address, options, function(err, tx){
results.totalCount++;
if(err)
return log.error(err);
@ -226,6 +224,7 @@ AddressService.prototype.getAddressHistory = function(addresses, options, stream
//sort items in desc block-height, then asc txid (if same height)
results.items.sort((a, b) => b.__height - a.__height || a.txid().localeCompare(b.txid()));
results.totalCount = parseInt(results.totalCount.toFixed());
//TODO: sorting of tx list (results.items)
callback(null, results);