Omnibus commited on
Commit
7f183d4
·
1 Parent(s): 2cd5c0c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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["chain"][-1]["balance"]
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["chain"][-1]["index"] > 1:
367
- balance = lod_rec["chain"][-1]["balance"]
368
- if lod_rec["chain"][-1]["index"] == 1:
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