Skip to content
Snippets Groups Projects
Commit 359ba812 authored by inso's avatar inso
Browse files

Fix #492 - Certifications pending in certs view

We now display certifications not yet validated and do not
count them in the certifications stock
parent cd47affd
No related branches found
No related tags found
No related merge requests found
......@@ -193,11 +193,15 @@ class CertificationDialog(QObject):
block_0 = None
params = await self.community.parameters()
nb_certifications = len(await account_identity.unique_valid_certified_by(self.app.identities_registry, self.community))
certifications = await account_identity.unique_valid_certified_by(self.app.identities_registry, self.community)
nb_certifications = len([c for c in certifications if c['block_number']])
nb_cert_pending = len([c for c in certifications if not c['block_number']])
remaining_time = await account_identity.cert_issuance_delay(self.app.identities_registry, self.community)
cert_text = self.tr("Certifications sent : {nb_certifications}/{stock}").format(
nb_certifications=nb_certifications,
stock=params['sigStock'])
if nb_cert_pending > 0:
cert_text += " (+{nb_cert_pending} certifications pending)".format(nb_cert_pending=nb_cert_pending)
if remaining_time > 0:
cert_text += "\n"
days, remainder = divmod(remaining_time, 3600*24)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment