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

@ -117,6 +117,14 @@ angular.module('copayApp.controllers').controller('SendController',
var w = $rootScope.wallet;
function done(err, ntxid, merchantData) {
if (err) {
var message = 'The transaction' + (w.isShared() ? ' proposal' : '') + ' could not be created';
notification.error('Error', message);
$scope.loading = false;
$scope.loadTxs();
return;
}
// If user is granted the privilege of choosing
// their own amount, add it to the tx.
if (merchantData && +merchantData.total === 0) {