|
|
@ -728,10 +728,10 @@ WalletService.prototype._selectTxInputs = function(txp, cb) { |
|
|
|
if (!bitcoreError) { |
|
|
|
txp.inputPaths = _.pluck(txp.inputs, 'path'); |
|
|
|
txp.fee = bitcoreTx.getFee(); |
|
|
|
$.checkState(txp.fee < 1e8, 'Fees are too high!'); |
|
|
|
return cb(); |
|
|
|
} |
|
|
|
} catch (ex) { |
|
|
|
log.error('Error building Bitcore transaction', ex); |
|
|
|
return cb(ex); |
|
|
|
} |
|
|
|
} |
|
|
@ -797,7 +797,7 @@ WalletService.prototype.createTx = function(opts, cb) { |
|
|
|
return cb(new ClientError('Required argument missing')); |
|
|
|
|
|
|
|
var feePerKb = opts.feePerKb || 10000; |
|
|
|
if (feePerKb > 10000) |
|
|
|
if (feePerKb < WalletUtils.MIN_FEE_PER_KB || feePerKb > WalletUtils.MAX_FEE_PER_KB) |
|
|
|
return cb(new ClientError('Invalid fee per KB value')); |
|
|
|
|
|
|
|
self._runLocked(cb, function(cb) { |
|
|
|