identity now emits!

This commit is contained in:
Matias Alejo Garcia 2014-11-30 00:31:17 -03:00
commit 3ae6378678
33 changed files with 376 additions and 346 deletions

View file

@ -44,7 +44,6 @@ angular.module('copayApp.controllers').controller('CreateController',
notification.error('Error', 'Please enter the required fields');
return;
}
$scope.loading = true;
var opts = {
requiredCopayers: $scope.requiredCopayers,
totalCopayers: $scope.totalCopayers,
@ -52,8 +51,14 @@ angular.module('copayApp.controllers').controller('CreateController',
privateKeyHex: $scope.private,
networkName: $scope.networkName,
};
identityService.createWallet(opts, function(){
$scope.loading = false;
$rootScope.starting = true;
identityService.createWallet(opts, function(err, wallet){
$rootScope.starting = false;
if (err || !wallet) {
copay.logger.debug(err);
$scope.error = 'Could not create wallet.' + err;
}
$rootScope.$digest()
});
};
});