Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -266,7 +266,7 @@ def valid_send():
|
|
| 266 |
else:
|
| 267 |
response = f'Sender Blockchain is not valid. {mes} at Index {ind}'
|
| 268 |
z=False
|
| 269 |
-
return response,z
|
| 270 |
|
| 271 |
def valid_rec():
|
| 272 |
valid,ind,mes = mychain_rec.chain_valid(mychain_rec.chain)
|
|
@@ -393,10 +393,11 @@ def issue_tokens(send,rec,amount):
|
|
| 393 |
p=False
|
| 394 |
mes = f"Sender has no wallet {e}"
|
| 395 |
pass
|
| 396 |
-
mes1,val = valid_send()
|
|
|
|
| 397 |
if val == False:
|
| 398 |
p=False
|
| 399 |
-
mes =
|
| 400 |
|
| 401 |
#if val == True:
|
| 402 |
if p==True:
|
|
@@ -448,7 +449,8 @@ def issue_tokens(send,rec,amount):
|
|
| 448 |
_,rec_drop=update_rec_list()
|
| 449 |
trans_bx = merge_trans()
|
| 450 |
trans_data, trans_mes = bc_transactions(trans_bx)
|
| 451 |
-
|
|
|
|
| 452 |
|
| 453 |
return (mes, p, response_send, response_rec, show_chain_send, show_chain_rec, data_send, data_rec, message_send, message_rec, rec_send, rec_drop,trans_data,trans_mes)
|
| 454 |
############################## MYCHAIN END ###############################
|
|
|
|
| 266 |
else:
|
| 267 |
response = f'Sender Blockchain is not valid. {mes} at Index {ind}'
|
| 268 |
z=False
|
| 269 |
+
return response,z,mes,ind
|
| 270 |
|
| 271 |
def valid_rec():
|
| 272 |
valid,ind,mes = mychain_rec.chain_valid(mychain_rec.chain)
|
|
|
|
| 393 |
p=False
|
| 394 |
mes = f"Sender has no wallet {e}"
|
| 395 |
pass
|
| 396 |
+
mes1,val,mes2,ind = valid_send()
|
| 397 |
+
|
| 398 |
if val == False:
|
| 399 |
p=False
|
| 400 |
+
mes = f'Blockchain is not valid. {mes2} at Index {ind}'
|
| 401 |
|
| 402 |
#if val == True:
|
| 403 |
if p==True:
|
|
|
|
| 449 |
_,rec_drop=update_rec_list()
|
| 450 |
trans_bx = merge_trans()
|
| 451 |
trans_data, trans_mes = bc_transactions(trans_bx)
|
| 452 |
+
else:
|
| 453 |
+
pass
|
| 454 |
|
| 455 |
return (mes, p, response_send, response_rec, show_chain_send, show_chain_rec, data_send, data_rec, message_send, message_rec, rec_send, rec_drop,trans_data,trans_mes)
|
| 456 |
############################## MYCHAIN END ###############################
|