Do incomplete trades properly

This commit is contained in:
mez 2025-09-06 20:51:03 +01:00
parent 5d65a8b777
commit f18ce22b47
3 changed files with 6 additions and 9 deletions

View file

@ -2343,16 +2343,14 @@ def pendtradesgen():
if variables.newtab:
content.write(" target=\"_blank\"")
content.write("><code>" + event["date"].strftime("%Y-%m-%d") + "</code></a></p>\n")
allin = 0
try:
allin = len(event["pend"]) + event["randomsin"]
allin += len(event["received"])
except:
try:
allin = len(event["pend"])
except:
allin = 0
pass
try:
if len(event["lost"]) > allin:
lostlist = event["lost"][-(allin):]
lostlist = event["lost"][-(len(event["lost"]) - allin):]
else:
lostlist = event["lost"]
except: