diff --git a/src/js/ripple/remote.js b/src/js/ripple/remote.js index e7e19ab6..3c5087b9 100644 --- a/src/js/ripple/remote.js +++ b/src/js/ripple/remote.js @@ -94,6 +94,8 @@ function Remote(opts, trace) { this.fee_cushion = (typeof opts.fee_cushion === 'number') ? opts.fee_cushion : 1.2; this.max_fee = (typeof opts.max_fee === 'number') ? opts.max_fee : Infinity; + this.max_attempts = (typeof opts.max_attempts === 'number') ? opts.max_attempts : 10; + this._ledger_current_index = void(0); this._ledger_hash = void(0); this._ledger_time = void(0); diff --git a/src/js/ripple/transactionmanager.js b/src/js/ripple/transactionmanager.js index c4c5287f..0f48769f 100644 --- a/src/js/ripple/transactionmanager.js +++ b/src/js/ripple/transactionmanager.js @@ -20,6 +20,7 @@ function TransactionManager(account) { this._remote = account._remote; this._nextSequence = void(0); this._maxFee = this._remote.max_fee; + this._maxAttempts = this._remote.max_attempts; this._submissionTimeout = this._remote._submission_timeout; this._pending = new PendingQueue(); @@ -344,7 +345,7 @@ TransactionManager.prototype._request = function(tx) { var self = this; var remote = this._remote; - if (tx.attempts > 10) { + if (tx.attempts > this._maxAttempts) { return tx.emit('error', new RippleError('tejAttemptsExceeded')); }