diff --git a/js/controllers/send.js b/js/controllers/send.js index 100531945..fa5d49d07 100644 --- a/js/controllers/send.js +++ b/js/controllers/send.js @@ -163,6 +163,9 @@ angular.module('copayApp.controllers').controller('SendController', if (msg.match('expired')) msg = 'The payment request has expired'; + if (msg.match('XMLHttpRequest')) + msg = 'Error when sending to the blockchain. Resend it from Home'; + var message = 'The transaction' + ($scope.requiresMultipleSignatures ? ' proposal' : '') + ' could not be created: ' + msg; @@ -203,12 +206,15 @@ angular.module('copayApp.controllers').controller('SendController', }, function (err, txid, status) { $scope.loading = false; if ($scope.isWindowsPhoneApp) - $rootScope.wpInputFocused = false; + $rootScope.wpInputFocused = false; - if (err) - return $scope.setError(err); - txStatus.notify(status); - $scope.resetForm(); + if (err) { + $scope.setError(err); + } + else { + txStatus.notify(status); + $scope.resetForm(); + } }); }, 100); }; diff --git a/js/models/Wallet.js b/js/models/Wallet.js index 4f272f6d4..5f757a149 100644 --- a/js/models/Wallet.js +++ b/js/models/Wallet.js @@ -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 {