Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -437,9 +437,10 @@ def issue_tokens(send,rec,amount):
|
|
| 437 |
print (mes)
|
| 438 |
|
| 439 |
if p==False:
|
| 440 |
-
return (mes, p,
|
| 441 |
else:
|
| 442 |
-
|
|
|
|
| 443 |
mychain_send.new_transaction(f"{send}",f"{rec}",f"{amount}",f"{balance_send}")
|
| 444 |
message_send = "Transaction Added to Pool"
|
| 445 |
data_send = pd.DataFrame(mychain_send.pending_transactions)
|
|
@@ -452,7 +453,7 @@ def issue_tokens(send,rec,amount):
|
|
| 452 |
_,rec_send=update_send_list()
|
| 453 |
_,rec_drop=update_rec_list()
|
| 454 |
trans_bx = merge_trans()
|
| 455 |
-
trans_data,
|
| 456 |
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)
|
| 457 |
|
| 458 |
|
|
@@ -568,9 +569,9 @@ with gr.Blocks() as bc:
|
|
| 568 |
chain_json_rec = gr.JSON()
|
| 569 |
reset_source.click(res_source,None,block_text)
|
| 570 |
|
| 571 |
-
send_trans.click(issue_tokens,[send,rec,am],[block_text,out_box_bool,json_out_send,json_out_rec,chain_json_send,chain_json_rec,trans_data_send,trans_data_rec,block_text_send,block_text_rec,send,rec,trans_data
|
| 572 |
|
| 573 |
-
issue_btn.click(issue_tokens,[send,rec,am],[block_text,out_box_bool,json_out_send,json_out_rec,chain_json_send,chain_json_rec,trans_data_send,trans_data_rec,block_text_send,block_text_rec,send,rec,trans_data
|
| 574 |
#issue_btn.click(issue_tokens,[send,rec,am],[block_text,out_box_bool,json_out_send])
|
| 575 |
|
| 576 |
node_add.click(add_node,[this_space,node_repo,node_space,node_file],block_text)
|
|
|
|
| 437 |
print (mes)
|
| 438 |
|
| 439 |
if p==False:
|
| 440 |
+
return (mes, p, {}, {}, {}, {}, {}, {}, {}, {}, {}, {},{},{})
|
| 441 |
else:
|
| 442 |
+
|
| 443 |
+
def mint_to_chain():
|
| 444 |
mychain_send.new_transaction(f"{send}",f"{rec}",f"{amount}",f"{balance_send}")
|
| 445 |
message_send = "Transaction Added to Pool"
|
| 446 |
data_send = pd.DataFrame(mychain_send.pending_transactions)
|
|
|
|
| 453 |
_,rec_send=update_send_list()
|
| 454 |
_,rec_drop=update_rec_list()
|
| 455 |
trans_bx = merge_trans()
|
| 456 |
+
trans_data, mes = bc_transactions(trans_bx)
|
| 457 |
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)
|
| 458 |
|
| 459 |
|
|
|
|
| 569 |
chain_json_rec = gr.JSON()
|
| 570 |
reset_source.click(res_source,None,block_text)
|
| 571 |
|
| 572 |
+
send_trans.click(issue_tokens,[send,rec,am],[block_text,out_box_bool,json_out_send,json_out_rec,chain_json_send,chain_json_rec,trans_data_send,trans_data_rec,block_text_send,block_text_rec,send,rec,trans_data])
|
| 573 |
|
| 574 |
+
issue_btn.click(issue_tokens,[send,rec,am],[block_text,out_box_bool,json_out_send,json_out_rec,chain_json_send,chain_json_rec,trans_data_send,trans_data_rec,block_text_send,block_text_rec,send,rec,trans_data])
|
| 575 |
#issue_btn.click(issue_tokens,[send,rec,am],[block_text,out_box_bool,json_out_send])
|
| 576 |
|
| 577 |
node_add.click(add_node,[this_space,node_repo,node_space,node_file],block_text)
|