Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -513,6 +513,14 @@ def display_chain_rec():
|
|
| 513 |
return response
|
| 514 |
|
| 515 |
def issue_tokens(send,rec,amount):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 516 |
#print(f"CURRENT USER:: {api.whoami(['name'])}")
|
| 517 |
#repo = f'omnibus/{space}'
|
| 518 |
#is_valid='True'
|
|
@@ -557,6 +565,8 @@ def issue_tokens(send,rec,amount):
|
|
| 557 |
except Exception:
|
| 558 |
mes = "Blockchain not loaded?"
|
| 559 |
p=False
|
|
|
|
|
|
|
| 560 |
if p==True:
|
| 561 |
mychain_send.new_transaction(f"{sender}",f"{recipient}",f"{amount}",f"{balance_send}")
|
| 562 |
message_send = "Transaction Added to Pool"
|
|
@@ -567,8 +577,7 @@ def issue_tokens(send,rec,amount):
|
|
| 567 |
response_send, show_chain_send,data_send, message_send = mychain_mine_block_send(balance_send, chain_r=None,chain_n=send)
|
| 568 |
response_rec, show_chain_rec,data_rec, message_rec = mychain_mine_block_send(balance_rec, chain_r=None,chain_n=rec)
|
| 569 |
mes = (f'Send: {message_send} :: Recieve: {message_rec}')
|
| 570 |
-
return (response_send, response_rec, show_chain_send, show_chain_rec, data_send, data_rec, message_send, message_rec)
|
| 571 |
-
|
| 572 |
|
| 573 |
############################## MYCHAIN END ###############################
|
| 574 |
|
|
|
|
| 513 |
return response
|
| 514 |
|
| 515 |
def issue_tokens(send,rec,amount):
|
| 516 |
+
response_send=None
|
| 517 |
+
response_rec=None
|
| 518 |
+
show_chain_send=None
|
| 519 |
+
show_chain_rec=None
|
| 520 |
+
data_send=None
|
| 521 |
+
data_rec=None
|
| 522 |
+
message_send=None
|
| 523 |
+
message_rec=None
|
| 524 |
#print(f"CURRENT USER:: {api.whoami(['name'])}")
|
| 525 |
#repo = f'omnibus/{space}'
|
| 526 |
#is_valid='True'
|
|
|
|
| 565 |
except Exception:
|
| 566 |
mes = "Blockchain not loaded?"
|
| 567 |
p=False
|
| 568 |
+
|
| 569 |
+
|
| 570 |
if p==True:
|
| 571 |
mychain_send.new_transaction(f"{sender}",f"{recipient}",f"{amount}",f"{balance_send}")
|
| 572 |
message_send = "Transaction Added to Pool"
|
|
|
|
| 577 |
response_send, show_chain_send,data_send, message_send = mychain_mine_block_send(balance_send, chain_r=None,chain_n=send)
|
| 578 |
response_rec, show_chain_rec,data_rec, message_rec = mychain_mine_block_send(balance_rec, chain_r=None,chain_n=rec)
|
| 579 |
mes = (f'Send: {message_send} :: Recieve: {message_rec}')
|
| 580 |
+
return (mes, p, response_send, response_rec, show_chain_send, show_chain_rec, data_send, data_rec, message_send, message_rec)
|
|
|
|
| 581 |
|
| 582 |
############################## MYCHAIN END ###############################
|
| 583 |
|