Catch error when transaction could not be sent. Update locked balance if transaction failed

This commit is contained in:
Gustavo Maximiliano Cortez 2015-02-13 17:39:30 -03:00
commit 7ffd483807
2 changed files with 12 additions and 5 deletions

View file

@ -1651,6 +1651,7 @@ Wallet.prototype.broadcastToBitcoinNetwork = function(ntxid, cb) {
log.debug('Wallet:' + self.getName() + ' Send failed:' + err);
self._checkIfTxIsSent(ntxid, function(err, txid) {
self.emitAndKeepAlive('balanceUpdated');
return cb(err, txid);
});
} else {