From 88c276ad4935d2e7a98025ab7277fdb6375c33cf Mon Sep 17 00:00:00 2001 From: sairajzero Date: Sat, 28 Jan 2023 20:05:57 +0530 Subject: [PATCH] fix --- lib/services/address/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/services/address/index.js b/lib/services/address/index.js index 4ed6ef6d..14a1a7b4 100644 --- a/lib/services/address/index.js +++ b/lib/services/address/index.js @@ -208,7 +208,7 @@ AddressService.prototype.getAddressHistory = function(addresses, options, stream return log.error(err); if(!options.txNotNeeded && results.items.length < MAX_TX_QUERY_LIMIT) - if(!results.items.some(x => x.txid === tx.txid)) //push only if tx not already in array + if(!results.items.some(x => x.txid() === tx.txid())) //push only if tx not already in array results.items.push(tx); streamer(null, tx); @@ -223,6 +223,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())); + console.debug("ITEMS:", results.items) //TODO: sorting of tx list (results.items) callback(null, results); @@ -825,9 +826,8 @@ AddressService.prototype._streamAddressSummary = function(address, options, stre q.pause(); //pause and wait until queue is set - function process_chunk(err, tx, ...args){ + function process_chunk(err, tx){ - console.debug("PROCESS_CHUNK", args) streamer(err, tx); if(err){