Merge pull request #463 from matiu/config/history-limit

update history limit
This commit is contained in:
Ivan Socolsky 2016-02-17 17:00:54 -03:00
commit 0e215b730f
2 changed files with 4 additions and 4 deletions

View File

@ -45,4 +45,6 @@ Defaults.FIAT_RATE_PROVIDER = 'BitPay';
Defaults.FIAT_RATE_FETCH_INTERVAL = 10; // In minutes
Defaults.FIAT_RATE_MAX_LOOK_BACK_TIME = 120; // In minutes
Defaults.HISTORY_LIMIT = 100;
module.exports = Defaults;

View File

@ -42,8 +42,6 @@ var messageBroker;
var fiatRateService;
var serviceVersion;
var HISTORY_LIMIT = 10;
/**
* Creates an instance of the Bitcore Wallet Service.
* @constructor
@ -2153,8 +2151,8 @@ WalletService.prototype.getTxHistory = function(opts, cb) {
var self = this;
opts = opts || {};
opts.limit = (_.isUndefined(opts.limit) ? HISTORY_LIMIT : opts.limit);
if (opts.limit > HISTORY_LIMIT)
opts.limit = (_.isUndefined(opts.limit) ? Defaults.HISTORY_LIMIT : opts.limit);
if (opts.limit > Defaults.HISTORY_LIMIT)
return cb(Errors.HISTORY_LIMIT_EXCEEDED);
function decorate(txs, addresses, proposals) {