Add option to Identity#store to fail if it exists
This commit is contained in:
parent
5eade81294
commit
281d66d6e0
2 changed files with 20 additions and 14 deletions
|
|
@ -29,7 +29,13 @@ angular.module('copayApp.services')
|
|||
controllerUtils.onErrorDigest(
|
||||
scope, 'Could not create default wallet');
|
||||
} else {
|
||||
controllerUtils.bindProfile(scope, iden, wallet.id);
|
||||
iden.store({failIfExists: true}, function(err) {
|
||||
if (err) {
|
||||
controllerUtils.onErrorDigest(scope, 'User already exists!');
|
||||
} else {
|
||||
controllerUtils.bindProfile(scope, iden, wallet.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
scope.loading = false;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue