From b74318862ea7f74b063a603a552ca5967dcc8e30 Mon Sep 17 00:00:00 2001 From: matiu Date: Sun, 3 Sep 2017 11:16:02 -0300 Subject: [PATCH] add uniq to insight queries --- lib/blockchainexplorers/insight.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/blockchainexplorers/insight.js b/lib/blockchainexplorers/insight.js index 1a5edb9..937eb83 100644 --- a/lib/blockchainexplorers/insight.js +++ b/lib/blockchainexplorers/insight.js @@ -57,7 +57,7 @@ Insight.prototype.getUtxos = function(addresses, cb) { method: 'POST', path: this.apiPrefix + '/addrs/utxo', json: { - addrs: [].concat(addresses).join(',') + addrs: _.uniq([].concat(addresses)).join(',') }, }; @@ -116,7 +116,7 @@ Insight.prototype.getTransactions = function(addresses, from, to, cb) { method: 'POST', path: this.apiPrefix + '/addrs/txs' + (qs.length > 0 ? '?' + qs.join('&') : ''), json: { - addrs: [].concat(addresses).join(',') + addrs: _.uniq([].concat(addresses)).join(',') }, timeout: 120000, };