DPP/DLT functionality #36
|
@ -80,10 +80,10 @@ def save_proof(signature, ev_uuid, result, proof_type, user):
|
||||||
if result['Status'] == STATUS_CODE.get("Success"):
|
if result['Status'] == STATUS_CODE.get("Success"):
|
||||||
timestamp = result.get('Data', {}).get('data', {}).get('timestamp')
|
timestamp = result.get('Data', {}).get('data', {}).get('timestamp')
|
||||||
|
|
||||||
logger.error("timestamp: %s", timestamp)
|
|
||||||
if not timestamp:
|
if not timestamp:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
logger.debug("timestamp: %s", timestamp)
|
||||||
d = {
|
d = {
|
||||||
"type": proof_type,
|
"type": proof_type,
|
||||||
"timestamp": timestamp,
|
"timestamp": timestamp,
|
||||||
|
|
|
@ -10,8 +10,6 @@ from evidence.models import Evidence
|
||||||
from evidence.parse import Build
|
from evidence.parse import Build
|
||||||
from dpp.models import Proof
|
from dpp.models import Proof
|
||||||
|
|
||||||
logger = logging.getLogger('django')
|
|
||||||
|
|
||||||
|
|
||||||
class ProofView(View):
|
class ProofView(View):
|
||||||
|
|
||||||
|
@ -21,9 +19,6 @@ class ProofView(View):
|
||||||
if not proof:
|
if not proof:
|
||||||
return JsonResponse({}, status=404)
|
return JsonResponse({}, status=404)
|
||||||
|
|
||||||
logger.error(proof.type)
|
|
||||||
logger.error(proof.signature)
|
|
||||||
|
|
||||||
ev = Evidence(proof.uuid)
|
ev = Evidence(proof.uuid)
|
||||||
if not ev.doc:
|
if not ev.doc:
|
||||||
return JsonResponse({}, status=404)
|
return JsonResponse({}, status=404)
|
||||||
|
@ -31,10 +26,6 @@ class ProofView(View):
|
||||||
dev = Build(ev.doc, None, check=True)
|
dev = Build(ev.doc, None, check=True)
|
||||||
doc = dev.get_phid()
|
doc = dev.get_phid()
|
||||||
|
|
||||||
logger.error(doc)
|
|
||||||
hs = hashlib.sha3_256(json.dumps(doc).encode()).hexdigest()
|
|
||||||
logger.error(hs)
|
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
"algorithm": ALGORITHM,
|
"algorithm": ALGORITHM,
|
||||||
"document": json.dumps(doc)
|
"document": json.dumps(doc)
|
||||||
|
|
Loading…
Reference in a new issue