add uniq to insight queries

This commit is contained in:
matiu 2017-09-03 11:16:02 -03:00
parent c4f87ccb17
commit b74318862e
1 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ Insight.prototype.getUtxos = function(addresses, cb) {
method: 'POST', method: 'POST',
path: this.apiPrefix + '/addrs/utxo', path: this.apiPrefix + '/addrs/utxo',
json: { json: {
addrs: [].concat(addresses).join(',') addrs: _.uniq([].concat(addresses)).join(',')
}, },
}; };
@ -116,7 +116,7 @@ Insight.prototype.getTransactions = function(addresses, from, to, cb) {
method: 'POST', method: 'POST',
path: this.apiPrefix + '/addrs/txs' + (qs.length > 0 ? '?' + qs.join('&') : ''), path: this.apiPrefix + '/addrs/txs' + (qs.length > 0 ? '?' + qs.join('&') : ''),
json: { json: {
addrs: [].concat(addresses).join(',') addrs: _.uniq([].concat(addresses)).join(',')
}, },
timeout: 120000, timeout: 120000,
}; };