From 69654d1e7f63c60f35644b13eb5f97833af47fc5 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 8 Nov 2024 12:23:45 +0100 Subject: [PATCH] fix flow --- workbench-script.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/workbench-script.py b/workbench-script.py index 93515af..924d2f9 100644 --- a/workbench-script.py +++ b/workbench-script.py @@ -12,8 +12,6 @@ import gettext import locale import logging -from pathlib import Path -from string import Template from datetime import datetime @@ -530,9 +528,13 @@ def main(): convert_to_legacy_snapshot(snapshot) snapshot = json.dumps(snapshot) else: - snapshot = convert_to_credential(snapshot) url_wallet = config.get("url_wallet") wb_sign_token = config.get("wb_sign_token") + + if wb_sign_token: + tk = wb_sign_token.encode("utf8") + snapshot["token_hash"] = hashlib.hash256(tk).hexdigest() + if url_wallet and wb_sign_token: snapshot = send_to_sign_credential(snapshot, wb_sign_token, url_wallet)