Don't break lines at 80 characters.

This commit is contained in:
David de Kloet 2015-05-16 22:50:44 +02:00
parent 8a8412f04a
commit 3d9560c0c5
1 changed files with 4 additions and 8 deletions

View File

@ -217,8 +217,7 @@ Transaction.prototype._isFeeDifferent = function() {
var fee = this._fee; var fee = this._fee;
var unspent = this._getUnspentValue(); var unspent = this._getUnspentValue();
if (fee !== unspent) { if (fee !== unspent) {
return new errors.Transaction.FeeError.Different( return new errors.Transaction.FeeError.Different('Unspent value is ' + unspent + ' but specified fee is ' + fee);
'Unspent value is ' + unspent + ' but specified fee is ' + fee);
} }
} }
}; };
@ -231,11 +230,9 @@ Transaction.prototype._isFeeTooLarge = function(opts) {
var maximumFee = Math.floor(Transaction.FEE_SECURITY_MARGIN * this._estimateFee()); var maximumFee = Math.floor(Transaction.FEE_SECURITY_MARGIN * this._estimateFee());
if (fee > maximumFee) { if (fee > maximumFee) {
if (this._missingChange()) { if (this._missingChange()) {
return new errors.Transaction.ChangeAddressMissing( return new errors.Transaction.ChangeAddressMissing( 'Fee is too large and no change address was provided');
'Fee is too large and no change address was provided');
} }
return new errors.Transaction.FeeError.TooLarge( return new errors.Transaction.FeeError.TooLarge('expected less than ' + maximumFee + ' but got ' + fee);
'expected less than ' + maximumFee + ' but got ' + fee);
} }
}; };
@ -246,8 +243,7 @@ Transaction.prototype._isFeeTooSmall = function(opts) {
var fee = this._getUnspentValue(); var fee = this._getUnspentValue();
var minimumFee = Math.ceil(this._estimateFee() / Transaction.FEE_SECURITY_MARGIN); var minimumFee = Math.ceil(this._estimateFee() / Transaction.FEE_SECURITY_MARGIN);
if (fee < minimumFee) { if (fee < minimumFee) {
return new errors.Transaction.FeeError.TooSmall( return new errors.Transaction.FeeError.TooSmall('expected more than ' + minimumFee + ' but got ' + fee);
'expected more than ' + minimumFee + ' but got ' + fee);
} }
}; };