Browse Source

mv constant to defaults

activeAddress
Matias Alejo Garcia 9 years ago
parent
commit
270c5cbeff
  1. 2
      lib/common/defaults.js
  2. 6
      lib/server.js

2
lib/common/defaults.js

@ -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;

6
lib/server.js

@ -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…
Cancel
Save