Display a message for users whose have wallet:: but not profile::
This commit is contained in:
parent
bfdfc68d83
commit
2c07ad6dd7
7 changed files with 94 additions and 8 deletions
|
|
@ -4,6 +4,24 @@ angular.module('copayApp.services')
|
|||
.factory('identityService', function($rootScope, $location, pluginManager, controllerUtils) {
|
||||
var root = {};
|
||||
|
||||
root.check = function (scope) {
|
||||
copay.Identity.checkIfExistsAny({
|
||||
pluginManager: pluginManager,
|
||||
}, function(anyProfile) {
|
||||
copay.Wallet.checkIfExistsAny({
|
||||
pluginManager: pluginManager,
|
||||
}, function(anyWallet) {
|
||||
scope.retreiving = false;
|
||||
scope.anyProfile = anyProfile ? true : false;
|
||||
scope.anyWallet = anyWallet ? true : false;
|
||||
|
||||
if (!scope.anyProfile) {
|
||||
$location.path('/createProfile');
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
root.create = function(scope, form) {
|
||||
var iden = copay.Identity.create({
|
||||
email: form.email.$modelValue,
|
||||
|
|
@ -60,7 +78,7 @@ angular.module('copayApp.services')
|
|||
}
|
||||
scope.loading = false;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return root;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue