From e8fe0de6a7a051645a3ea0e30425d81dc64fbe35 Mon Sep 17 00:00:00 2001 From: blavenie <benoit.lavenier@e-is.pro> Date: Sat, 12 Nov 2016 19:11:50 +0100 Subject: [PATCH] - Identity : enable button "Certify" is not login --- www/js/controllers/wot-controllers.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/www/js/controllers/wot-controllers.js b/www/js/controllers/wot-controllers.js index 7f8ca0a9..709fec00 100644 --- a/www/js/controllers/wot-controllers.js +++ b/www/js/controllers/wot-controllers.js @@ -455,10 +455,9 @@ function WotCertificationsViewController($scope, $rootScope, $state, $timeout, $ $scope.formData = identity; $scope.canCertify = $scope.formData.hasSelf && (!csWallet.isLogin() || (!csWallet.isUserPubkey(pubkey))); $scope.canSelectAndCertify = $scope.formData.hasSelf && csWallet.isUserPubkey(pubkey); - $scope.alreadyCertified = $scope.canCertify ? - (!csWallet.isLogin() || - !!_.findWhere(identity.received_cert, { pubkey: csWallet.data.pubkey, valid: true }) || - !!_.findWhere(identity.received_cert_pending, { pubkey: csWallet.data.pubkey, valid: true })) : false; + $scope.alreadyCertified = !$scope.canCertify || !csWallet.isLogin() ? false : + (!!_.findWhere(identity.received_cert, { pubkey: csWallet.data.pubkey, valid: true }) || + !!_.findWhere(identity.received_cert_pending, { pubkey: csWallet.data.pubkey, valid: true })); $scope.loading = false; -- GitLab