Omnibus commited on
Commit
ad9c747
·
1 Parent(s): 0c0b2c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -12
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
- balance = lod_rec[-1]["balance"]
380
- if lod_rec["chain"][-1]["index"] == 1:
381
- balance = 0
382
  except Exception:
383
  p=False
384
- try:
385
- if lod_rec["chain"][0]["index"] > 1:
386
- balance = lod_rec[0]["balance"]
387
- if lod_rec["chain"][0]["index"] == 1:
388
- balance = 0
389
- p=True
390
- except Exception:
391
- p=False
 
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: