Merge pull request #1315 from isocolsky/fix/insight_down

Catching errors when trying to create new TXP
This commit is contained in:
Gustavo Maximiliano Cortez 2014-09-09 10:38:52 -03:00
commit ea91c603f9
6 changed files with 63 additions and 45 deletions

View file

@ -121,7 +121,15 @@ angular.module('copayApp.controllers').controller('SendController',
var w = $rootScope.wallet;
function done(ntxid, merchantData) {
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) {