|
@ -26,6 +26,7 @@ var TxProposal = require('./model/txproposal'); |
|
|
var Notification = require('./model/Notification'); |
|
|
var Notification = require('./model/Notification'); |
|
|
|
|
|
|
|
|
var MINIMUM_FEE_SAT = 10000; |
|
|
var MINIMUM_FEE_SAT = 10000; |
|
|
|
|
|
var DUST_THRESHOLD = 5430; |
|
|
|
|
|
|
|
|
var initialized = false; |
|
|
var initialized = false; |
|
|
var storage; |
|
|
var storage; |
|
@ -434,6 +435,8 @@ CopayServer.prototype._selectUtxos = function(txp, utxos) { |
|
|
return; |
|
|
return; |
|
|
} catch (ex) { |
|
|
} catch (ex) { |
|
|
//if (ex.name != 'bitcore.ErrorTransactionFeeError') {}
|
|
|
//if (ex.name != 'bitcore.ErrorTransactionFeeError') {}
|
|
|
|
|
|
//if (ex.name != 'bitcore.ErrorTransactionDustOutputs') {}
|
|
|
|
|
|
console.log(ex); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
i++; |
|
|
i++; |
|
@ -477,6 +480,9 @@ CopayServer.prototype.createTx = function(opts, cb) { |
|
|
if (toAddress.network != wallet.getNetworkName()) |
|
|
if (toAddress.network != wallet.getNetworkName()) |
|
|
return cb(new ClientError('INVALIDADDRESS', 'Incorrect address network')); |
|
|
return cb(new ClientError('INVALIDADDRESS', 'Incorrect address network')); |
|
|
|
|
|
|
|
|
|
|
|
if (opts.amount < DUST_THRESHOLD) |
|
|
|
|
|
return cb(new ClientError('DUSTAMOUNT', 'Amount below dust threshold')); |
|
|
|
|
|
|
|
|
self._getUtxos(function(err, utxos) { |
|
|
self._getUtxos(function(err, utxos) { |
|
|
if (err) return cb(err); |
|
|
if (err) return cb(err); |
|
|
|
|
|
|
|
|