Skip to content
Snippets Groups Projects
Commit f47d7f15 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

New certification sent not display - fix #320

parent 77087647
Branches
Tags
No related merge requests found
...@@ -525,12 +525,11 @@ function WotIdentityAbstractController($scope, $rootScope, $state, $timeout, UIU ...@@ -525,12 +525,11 @@ function WotIdentityAbstractController($scope, $rootScope, $state, $timeout, UIU
.then(function(cert) { .then(function(cert) {
UIUtils.loading.hide(); UIUtils.loading.hide();
if (cert) { if (cert) {
cert.uid = csWallet.data.uid; $scope.prepareNewCert(cert);
cert.pubkey = csWallet.data.pubkey; $scope.alreadyCertified = true;
cert.isMember = csWallet.data.isMember;
UIUtils.alert.info('INFO.CERTIFICATION_DONE'); UIUtils.alert.info('INFO.CERTIFICATION_DONE');
$scope.formData.received_cert_pending.unshift(cert); $scope.formData.received_cert_pending.unshift(cert);
$scope.motionCertifications(); $scope.doMotion();
} }
}) })
.catch(UIUtils.onError('ERROR.SEND_CERTIFICATION_FAILED')); .catch(UIUtils.onError('ERROR.SEND_CERTIFICATION_FAILED'));
...@@ -621,9 +620,10 @@ function WotIdentityAbstractController($scope, $rootScope, $state, $timeout, UIU ...@@ -621,9 +620,10 @@ function WotIdentityAbstractController($scope, $rootScope, $state, $timeout, UIU
.then(function(cert) { .then(function(cert) {
UIUtils.loading.hide(); UIUtils.loading.hide();
if (cert) { if (cert) {
$scope.prepareNewCert(cert);
UIUtils.alert.info('INFO.CERTIFICATION_DONE'); UIUtils.alert.info('INFO.CERTIFICATION_DONE');
$scope.formData.given_cert_pending.unshift(cert); $scope.formData.given_cert_pending.unshift(cert);
$scope.motionGivenCertifications(); $scope.doMotion();
} }
}) })
.catch(UIUtils.onError('ERROR.SEND_CERTIFICATION_FAILED')); .catch(UIUtils.onError('ERROR.SEND_CERTIFICATION_FAILED'));
...@@ -633,6 +633,16 @@ function WotIdentityAbstractController($scope, $rootScope, $state, $timeout, UIU ...@@ -633,6 +633,16 @@ function WotIdentityAbstractController($scope, $rootScope, $state, $timeout, UIU
}; };
// Add wallet's data to a new cert
$scope.prepareNewCert = function(cert) {
cert.uid = csWallet.data.uid;
cert.pubkey = csWallet.data.pubkey;
cert.isMember = csWallet.data.isMember;
cert.avatar = csWallet.data.avatar;
cert.name = csWallet.data.name;
};
// Could be override by subclass
$scope.doMotion = function() { $scope.doMotion = function() {
$timeout(function() { $timeout(function() {
UIUtils.motion.fadeSlideInRight(); UIUtils.motion.fadeSlideInRight();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment