custom runserver audit changes
This commit is contained in:
parent
0a96bc224a
commit
c42c519808
|
@ -21,6 +21,10 @@ from users.models import UserCredentialsForBlockchain
|
|||
from django.core.files.base import File as DjangoFile
|
||||
import tempfile
|
||||
from io import BytesIO
|
||||
from auto_email.views import sendmail
|
||||
from lpp.certificate.createCertificate import certificateGenrate
|
||||
|
||||
|
||||
basePath = BasePath()
|
||||
|
||||
User = get_user_model()
|
||||
|
@ -303,6 +307,10 @@ def run_audit(msg):
|
|||
status.transaction_hash =str(transactioni_id)
|
||||
status.save()
|
||||
|
||||
to_email = [user.email]
|
||||
email_code = 'SB1'
|
||||
sendmail(to_email=to_email , email_code=email_code)
|
||||
|
||||
# user_infos = user_info(tx_hash=Response,service="Script Audit",gas_fee=gasprice)
|
||||
# addition_result = user_infos.update_info(request)
|
||||
hash2 = hash_decrypation(hash2)
|
||||
|
@ -350,6 +358,10 @@ def run_audit(msg):
|
|||
|
||||
else:
|
||||
|
||||
to_email = [user.email]
|
||||
email_code = 'SB2'
|
||||
sendmail(to_email=to_email , email_code=email_code)
|
||||
|
||||
Response = UploadScriptAuditData(OWNER_KEY,blockchain_obj.publicKey,blockchain_obj.user_id,script_id,str(audit_data))
|
||||
print("tx_hash",Response)
|
||||
hash = hash_decrypation(hash)
|
||||
|
@ -367,6 +379,8 @@ def run_audit(msg):
|
|||
"private key":userkey,
|
||||
"Transaction Hash": tx_id,
|
||||
}
|
||||
certificate = certificateGenrate(user.username,"script audit",tx_id,projectname=script_file_name,matic=gasprice)
|
||||
sendmail(to_email=to_email , email_code=email_code, key_value=key_value, filePath=certificate)
|
||||
|
||||
print("::::::::::::::",key_value)
|
||||
print("userkey = ", userkey)
|
||||
|
|
Loading…
Reference in New Issue