Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -374,21 +374,23 @@ def issue_tokens(send,rec,amount):
|
|
374 |
response,message = get_my_chain_rec(rec)
|
375 |
#lod_rec = json.loads(response)
|
376 |
lod_rec = response
|
|
|
377 |
try:
|
378 |
-
if lod_rec["chain"][-1]["index"] > 1:
|
379 |
-
|
380 |
-
if lod_rec["chain"][-1]["index"] == 1:
|
381 |
-
|
382 |
except Exception:
|
383 |
p=False
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
|
|
392 |
balance_rec =int(balance)+int(amount)
|
393 |
|
394 |
if balance_send < 0:
|
|
|
374 |
response,message = get_my_chain_rec(rec)
|
375 |
#lod_rec = json.loads(response)
|
376 |
lod_rec = response
|
377 |
+
print (lod_rec)
|
378 |
try:
|
379 |
+
#if lod_rec["chain"][-1]["index"] > 1:
|
380 |
+
balance = lod_rec[-1]["balance"]
|
381 |
+
#if lod_rec["chain"][-1]["index"] == 1:
|
382 |
+
# balance = 0
|
383 |
except Exception:
|
384 |
p=False
|
385 |
+
balance = 0
|
386 |
+
#try:
|
387 |
+
# if lod_rec["chain"][0]["index"] > 1:
|
388 |
+
# balance = lod_rec[0]["balance"]
|
389 |
+
# if lod_rec["chain"][0]["index"] == 1:
|
390 |
+
# balance = 0
|
391 |
+
# p=True
|
392 |
+
#except Exception:
|
393 |
+
# p=False
|
394 |
balance_rec =int(balance)+int(amount)
|
395 |
|
396 |
if balance_send < 0:
|