fix some event handlers
This commit is contained in:
parent
5d8b83823a
commit
67fd6344dd
7 changed files with 52 additions and 14 deletions
|
|
@ -41,7 +41,7 @@ angular.module('copayApp.controllers').controller('CreateController',
|
|||
|
||||
$scope.create = function(form) {
|
||||
if (form && form.$invalid) {
|
||||
notification.error('Error', 'Please enter the required fields');
|
||||
$scope.error = 'Please enter the required fields';
|
||||
return;
|
||||
}
|
||||
var opts = {
|
||||
|
|
@ -56,7 +56,11 @@ angular.module('copayApp.controllers').controller('CreateController',
|
|||
$rootScope.starting = false;
|
||||
if (err || !wallet) {
|
||||
copay.logger.debug(err);
|
||||
$scope.error = 'Could not create wallet.' + err;
|
||||
if (err.match('OVERQUOTA')){
|
||||
$scope.error = 'Could not create wallet: storage limits on remove server exceeded';
|
||||
} else {
|
||||
$scope.error = 'Could not create wallet: ' + err;
|
||||
}
|
||||
}
|
||||
$rootScope.$digest()
|
||||
});
|
||||
|
|
|
|||
|
|
@ -46,11 +46,13 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
|
|||
} else {
|
||||
$scope.error = 'Unknown error';
|
||||
}
|
||||
$scope.done();
|
||||
}
|
||||
|
||||
if (iden) {
|
||||
iden.on('newWallet', $scope.done);
|
||||
iden.on('noWallets', $scope.done);
|
||||
iden.openWallets();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@ angular.module('copayApp.controllers').controller('ProfileController', function(
|
|||
identityService.deleteWallet(w, function(err) {
|
||||
$scope.loading = false;
|
||||
if (err) {
|
||||
log.warn(err);
|
||||
copay.logger.warn(err);
|
||||
}
|
||||
$scope.setWallets();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue