added from & to args to #getTransactions call
This commit is contained in:
parent
82bfa7d855
commit
e77c7d90b1
1 changed files with 15 additions and 10 deletions
|
|
@ -271,8 +271,13 @@ Insight.prototype.getTransactions = function (addresses, from, to, cb) {
|
||||||
preconditions.shouldBeArray(addresses);
|
preconditions.shouldBeArray(addresses);
|
||||||
preconditions.shouldBeFunction(cb);
|
preconditions.shouldBeFunction(cb);
|
||||||
|
|
||||||
var qs = '?from=' + (from || 0);
|
var qs = '';
|
||||||
if (to) qs += '&to=' + to;
|
if (_.isNumber(from)) {
|
||||||
|
qs += '?from=' + from;
|
||||||
|
if (_.isNumber(to)) {
|
||||||
|
qs += '&to=' + to;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.requestPost('/api/addrs/txs' + qs, {
|
this.requestPost('/api/addrs/txs' + qs, {
|
||||||
addrs: addresses.join(',')
|
addrs: addresses.join(',')
|
||||||
|
|
@ -303,7 +308,7 @@ Insight.prototype.getUnspent = function(addresses, cb) {
|
||||||
Insight.prototype.getActivity = function(addresses, cb) {
|
Insight.prototype.getActivity = function(addresses, cb) {
|
||||||
preconditions.shouldBeArray(addresses);
|
preconditions.shouldBeArray(addresses);
|
||||||
|
|
||||||
this.getTransactions(addresses, function then(err, txs) {
|
this.getTransactions(addresses, null, null, function then(err, txs) {
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
|
|
||||||
var flatArray = function(xss) {
|
var flatArray = function(xss) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue