|
|
@ -1645,6 +1645,8 @@ WalletService.prototype._canCreateTx = function(cb) { |
|
|
|
WalletService.prototype._validateOutputs = function(opts, wallet, cb) { |
|
|
|
var dustThreshold = Math.max(Defaults.MIN_OUTPUT_AMOUNT, Bitcore.Transaction.DUST_AMOUNT); |
|
|
|
|
|
|
|
if (_.isEmpty(opts.outputs)) return new ClientError('No outputs were specified'); |
|
|
|
|
|
|
|
for (var i = 0; i < opts.outputs.length; i++) { |
|
|
|
var output = opts.outputs[i]; |
|
|
|
output.valid = false; |
|
|
@ -1753,8 +1755,6 @@ WalletService.prototype.createTx = function(opts, cb) { |
|
|
|
|
|
|
|
opts = opts || {}; |
|
|
|
|
|
|
|
if (!checkRequired(opts, ['outputs'], cb)) return; |
|
|
|
|
|
|
|
function getChangeAddress(wallet, cb) { |
|
|
|
if (wallet.singleAddress) { |
|
|
|
self.storage.fetchAddresses(self.walletId, function(err, addresses) { |
|
|
|