Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -356,8 +356,23 @@ def issue_tokens(send,rec,amount):
|
|
| 356 |
mes = f"Sender has no wallet {e}"
|
| 357 |
pass
|
| 358 |
if p==True:
|
| 359 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 360 |
print (balance)
|
|
|
|
| 361 |
balance_send =int(balance)-int(amount)
|
| 362 |
if balance_send >=0:
|
| 363 |
p=True
|
|
@@ -374,7 +389,7 @@ def issue_tokens(send,rec,amount):
|
|
| 374 |
p=False
|
| 375 |
try:
|
| 376 |
if lod_rec["chain"][0]["index"] > 1:
|
| 377 |
-
balance = lod_rec[
|
| 378 |
if lod_rec["chain"][0]["index"] == 1:
|
| 379 |
balance = 0
|
| 380 |
p=True
|
|
|
|
| 356 |
mes = f"Sender has no wallet {e}"
|
| 357 |
pass
|
| 358 |
if p==True:
|
| 359 |
+
try:
|
| 360 |
+
if lod["chain"][-1]["index"] > 1:
|
| 361 |
+
balance = lod[-1]["balance"]
|
| 362 |
+
if lod["chain"][-1]["index"] == 1:
|
| 363 |
+
balance = 0
|
| 364 |
+
except Exception:
|
| 365 |
+
p=False
|
| 366 |
+
try:
|
| 367 |
+
if lod["chain"][0]["index"] > 1:
|
| 368 |
+
balance = lod[0]["balance"]
|
| 369 |
+
if lod["chain"][0]["index"] == 1:
|
| 370 |
+
balance = 0
|
| 371 |
+
p=True
|
| 372 |
+
except Exception:
|
| 373 |
+
p=False
|
| 374 |
print (balance)
|
| 375 |
+
|
| 376 |
balance_send =int(balance)-int(amount)
|
| 377 |
if balance_send >=0:
|
| 378 |
p=True
|
|
|
|
| 389 |
p=False
|
| 390 |
try:
|
| 391 |
if lod_rec["chain"][0]["index"] > 1:
|
| 392 |
+
balance = lod_rec[0]["balance"]
|
| 393 |
if lod_rec["chain"][0]["index"] == 1:
|
| 394 |
balance = 0
|
| 395 |
p=True
|