Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -373,9 +373,6 @@ def issue_tokens(send,rec,amount):
|
|
373 |
message_rec=None
|
374 |
trans_data=None
|
375 |
trans_mes=None
|
376 |
-
#print(f"CURRENT USER:: {api.whoami(['name'])}")
|
377 |
-
#repo = f'omnibus/{space}'
|
378 |
-
#is_valid='True'
|
379 |
balance_send = 0
|
380 |
balance_rec = 0
|
381 |
|
@@ -385,7 +382,7 @@ def issue_tokens(send,rec,amount):
|
|
385 |
mes = None
|
386 |
try:
|
387 |
response,message = get_my_chain_send(send)
|
388 |
-
print (f'response:{response}::message{message}')
|
389 |
#r = requests.get(f'{main_balance}{send}.json')
|
390 |
lod=response
|
391 |
#lod = json.loads(response)
|
@@ -405,16 +402,16 @@ def issue_tokens(send,rec,amount):
|
|
405 |
except Exception:
|
406 |
balance = 0
|
407 |
p=False
|
408 |
-
print (balance)
|
409 |
balance_send =int(balance)-int(amount)
|
410 |
if balance_send >=0:
|
411 |
p=True
|
412 |
response,message = get_my_chain_rec(rec)
|
413 |
lod_rec = response
|
414 |
-
print (lod_rec)
|
415 |
try:
|
416 |
balance = lod_rec["chain"][-1]["balance"]
|
417 |
-
print (balance)
|
418 |
except Exception:
|
419 |
p=False
|
420 |
balance = 0
|
@@ -426,6 +423,7 @@ def issue_tokens(send,rec,amount):
|
|
426 |
if val == False:
|
427 |
mes = mes
|
428 |
p = False
|
|
|
429 |
if z==False:
|
430 |
mes = "Invalid Blockchain"
|
431 |
p=False
|
|
|
373 |
message_rec=None
|
374 |
trans_data=None
|
375 |
trans_mes=None
|
|
|
|
|
|
|
376 |
balance_send = 0
|
377 |
balance_rec = 0
|
378 |
|
|
|
382 |
mes = None
|
383 |
try:
|
384 |
response,message = get_my_chain_send(send)
|
385 |
+
#print (f'response:{response}::message{message}')
|
386 |
#r = requests.get(f'{main_balance}{send}.json')
|
387 |
lod=response
|
388 |
#lod = json.loads(response)
|
|
|
402 |
except Exception:
|
403 |
balance = 0
|
404 |
p=False
|
405 |
+
#print (balance)
|
406 |
balance_send =int(balance)-int(amount)
|
407 |
if balance_send >=0:
|
408 |
p=True
|
409 |
response,message = get_my_chain_rec(rec)
|
410 |
lod_rec = response
|
411 |
+
#print (lod_rec)
|
412 |
try:
|
413 |
balance = lod_rec["chain"][-1]["balance"]
|
414 |
+
#print (balance)
|
415 |
except Exception:
|
416 |
p=False
|
417 |
balance = 0
|
|
|
423 |
if val == False:
|
424 |
mes = mes
|
425 |
p = False
|
426 |
+
print(mes)
|
427 |
if z==False:
|
428 |
mes = "Invalid Blockchain"
|
429 |
p=False
|