Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -354,7 +354,7 @@ def issue_tokens(send,rec,amount):
|
|
354 |
mes = f"Sender has no wallet {e}"
|
355 |
pass
|
356 |
if p==True:
|
357 |
-
balance = lod[
|
358 |
#print (balance)
|
359 |
balance_send =int(balance)-int(amount)
|
360 |
if balance_send >=0:
|
@@ -363,9 +363,9 @@ def issue_tokens(send,rec,amount):
|
|
363 |
#lod_rec = json.loads(response)
|
364 |
lod_rec = response
|
365 |
#try:
|
366 |
-
if lod_rec[
|
367 |
-
balance = lod_rec[
|
368 |
-
if lod_rec[
|
369 |
balance = 0
|
370 |
balance_rec =int(balance)+int(amount)
|
371 |
|
|
|
354 |
mes = f"Sender has no wallet {e}"
|
355 |
pass
|
356 |
if p==True:
|
357 |
+
balance = lod[-1]["balance"]
|
358 |
#print (balance)
|
359 |
balance_send =int(balance)-int(amount)
|
360 |
if balance_send >=0:
|
|
|
363 |
#lod_rec = json.loads(response)
|
364 |
lod_rec = response
|
365 |
#try:
|
366 |
+
if lod_rec[-1]["index"] > 1:
|
367 |
+
balance = lod_rec[-1]["balance"]
|
368 |
+
if lod_rec[-1]["index"] == 1:
|
369 |
balance = 0
|
370 |
balance_rec =int(balance)+int(amount)
|
371 |
|