Commit e7b6e26b authored by Moul's avatar Moul Committed by Mael
Browse files

[enh] #183: cert: use echo() and confirm() from Click

parent 374cce0a
......@@ -15,7 +15,7 @@ You should have received a copy of the GNU Affero General Public License
along with Silkaj. If not, see <>.
from click import command, argument
from click import command, argument, echo, confirm
from time import time
from tabulate import tabulate
from duniterpy.api.bma import wot
......@@ -73,11 +73,9 @@ async def send_certification(id_to_certify):
message_exit("Certification is currently been processed")
# Certification confirmation
if not certification_confirmation(
issuer_id, issuer_pubkey, id_to_certify, main_id_to_certify
await client.close()
identity = Identity(
......@@ -118,11 +116,5 @@ def certification_confirmation(
cert.append(["Cert", "From", "–>", "To"])
cert.append(["ID", issuer_id, "–>", main_id_to_certify["uid"]])
cert.append(["Pubkey", issuer_pubkey, "–>", id_to_certify["pubkey"]])
if (
tabulate(cert, tablefmt="fancy_grid")
+ "\nDo you confirm sending this certification? [yes/no]: "
== "yes"
return True
echo(tabulate(cert, tablefmt="fancy_grid"))
confirm("Do you confirm sending this certification?", abort=True)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment