mv constant to defaults
This commit is contained in:
parent
4dfda532c8
commit
270c5cbeff
|
@ -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;
|
||||
|
|
|
@ -42,8 +42,6 @@ var messageBroker;
|
|||
var fiatRateService;
|
||||
var serviceVersion;
|
||||
|
||||
var HISTORY_LIMIT = 100;
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
|
|
Loading…
Reference in New Issue