Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -432,7 +432,7 @@ def get_my_chain_rec(recipient_name=None):
|
|
432 |
response = mychain_rec.chain
|
433 |
message = f"Blockchain loaded from: {main_balance}{recipient_name}.json"
|
434 |
return response,message
|
435 |
-
except:
|
436 |
message = f"Error loading from: {recipient_name}"
|
437 |
return ["Error Loading Chain"],message
|
438 |
|
@@ -511,13 +511,15 @@ def issue_tokens(send,rec,amount):
|
|
511 |
mes = None
|
512 |
try:
|
513 |
response,message = get_my_chain_send(send)
|
|
|
514 |
#r = requests.get(f'{main_balance}{send}.json')
|
515 |
lod = json.loads(response)
|
|
|
516 |
p=True
|
517 |
-
except Exception:
|
518 |
lod=[]
|
519 |
p=False
|
520 |
-
mes = "Sender has no wallet"
|
521 |
pass
|
522 |
if p==True:
|
523 |
balance = lod["chain"][-1]["balance"]
|
|
|
432 |
response = mychain_rec.chain
|
433 |
message = f"Blockchain loaded from: {main_balance}{recipient_name}.json"
|
434 |
return response,message
|
435 |
+
except Exception:
|
436 |
message = f"Error loading from: {recipient_name}"
|
437 |
return ["Error Loading Chain"],message
|
438 |
|
|
|
511 |
mes = None
|
512 |
try:
|
513 |
response,message = get_my_chain_send(send)
|
514 |
+
print (f'response:{response}::message{message}')
|
515 |
#r = requests.get(f'{main_balance}{send}.json')
|
516 |
lod = json.loads(response)
|
517 |
+
print (lod)
|
518 |
p=True
|
519 |
+
except Exception as e:
|
520 |
lod=[]
|
521 |
p=False
|
522 |
+
mes = f"Sender has no wallet {e}"
|
523 |
pass
|
524 |
if p==True:
|
525 |
balance = lod["chain"][-1]["balance"]
|