Catch error when creating new TXP

This commit is contained in:
Ivan Socolsky 2014-09-08 16:37:33 -03:00
commit cef93325f4
5 changed files with 35 additions and 2 deletions

View file

@ -2045,7 +2045,7 @@ Wallet.prototype.createTx = function(toAddress, amountSatStr, comment, opts, cb)
}
this.getUnspent(function(err, safeUnspent) {
if (err) return cb(err);
if (err) return cb(new Error('Could not get list of UTXOs'));
var ntxid = self.createTxSync(toAddress, amountSatStr, comment, safeUnspent, opts);
if (!ntxid) {