DragandDropGroup commited on
Commit
6676ba4
·
verified ·
1 Parent(s): 19936dc

Upload dragdrop.js

Browse files
Files changed (1) hide show
  1. dragdrop.js +5 -3
dragdrop.js CHANGED
@@ -924,6 +924,8 @@ def upload_to_blockchain(ipfs_hash):
924
 
925
  print("Transaction successful!")
926
  print("ETH Tx Hash:", tx_receipt.transactionHash.hex())
 
 
927
 
928
  return tx_receipt.transactionHash.hex()
929
 
@@ -962,9 +964,9 @@ def retreive_ipfs_hash_data(hashes):
962
  def submission(survey_data):
963
  ipfs_hash = upload_json_to_ipfs(survey_data)
964
  if ipfs_hash:
965
- print("IPFS Upload Successful")
966
- print(ipfs_hash)
967
- upload_to_blockchain(ipfs_hash)\n\n`
968
 
969
  pythonCode += `total_number_pages = ${totalPages+1}\n`;
970
  pythonCode += 'placeholder_buttons = None\n\n';
 
924
 
925
  print("Transaction successful!")
926
  print("ETH Tx Hash:", tx_receipt.transactionHash.hex())
927
+ st.success('Data successfully stored. Thank you for taking the survey!', icon="✅")
928
+ st.info(f'The Ethereum hash is: {tx_receipt.logs[0].transactionHash.hex()}', icon="ℹ️")
929
 
930
  return tx_receipt.transactionHash.hex()
931
 
 
964
  def submission(survey_data):
965
  ipfs_hash = upload_json_to_ipfs(survey_data)
966
  if ipfs_hash:
967
+ upload_to_blockchain(ipfs_hash)
968
+ st.info(f'The IPFS hash is: {ipfs_hash}', icon="ℹ️")\n\n`
969
+
970
 
971
  pythonCode += `total_number_pages = ${totalPages+1}\n`;
972
  pythonCode += 'placeholder_buttons = None\n\n';