fix error handler for join

This commit is contained in:
Matias Alejo Garcia 2015-04-24 03:37:18 -03:00
commit 460ddfa3bc
3 changed files with 11 additions and 5 deletions

View file

@ -134,7 +134,7 @@ angular.module('copayApp.controllers').controller('joinController',
this.join = function(form) {
if (form && form.$invalid) {
notification.error('Error', 'Please enter the required fields');
self.error = 'Please enter the required fields';
return;
}
self.loading = true;
@ -147,7 +147,8 @@ angular.module('copayApp.controllers').controller('joinController',
}, function(err) {
self.loading = false;
if (err) {
notification.error(err);
self.error = 'Could not join wallet: ' + (err.message ? err.message : err);
$rootScope.$apply();
}
else {
go.walletHome();