Skip to content
Snippets Groups Projects
Commit 1bd78937 authored by Miguel Braidot's avatar Miguel Braidot
Browse files

Se muestra el address que firmó la transacción en la respuesta al método verify

parent acbf0552
Branches bugfix+feature
No related tags found
No related merge requests found
......@@ -137,6 +137,7 @@ class Verify(APIView):
permanent_ots = PERMANENT_OTS_PREFIX + '-' + file_hash + '-' + ots_hash + '-' + tx_hash + '-' + str(block_number)
return Response({_('status'): _('success'),
_('from'): transaction['from'],
_('permanent_ots'): base64.b64encode(permanent_ots.encode('utf-8')).decode('utf-8'),
_('messages'): _('file_uploaded') % (
file_hash, str(block.number), str(Utils.datetime_from_timestamp(block.timestamp)))},
......@@ -157,9 +158,16 @@ class Verify(APIView):
block_number = TimestampManager.get_block_number(contract_version, ots_hash)
block = TimestampManager.get_block(block_number)
transaction = TimestampManager.get_transaction(tx_hash)
permanent_ots = PERMANENT_OTS_PREFIX + '-' + file_hash + '-' + ots_hash + '-' + tx_hash + '-' + str(block_number)
return Response({_('status'): _('success'), _('permanent_ots'): base64.b64encode(permanent_ots.encode('utf-8')).decode('utf-8') ,_('messages'): _('file_uploaded') % (file_hash, str(block.number), str(Utils.datetime_from_timestamp(block.timestamp)))},status=status.HTTP_200_OK)
return Response({
_('status'): _('success'),
_('from'): transaction['from'],
_('permanent_ots'): base64.b64encode(permanent_ots.encode('utf-8')).decode('utf-8'),
_('messages'): _('file_uploaded') % (file_hash, str(block.number), str(Utils.datetime_from_timestamp(block.timestamp)))
},status=status.HTTP_200_OK)
else:
try:
transaction = TimestampManager.get_transaction(tx_hash)
......
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