Skip to content

Commit

Permalink
fix check_total, even if unused
Browse files Browse the repository at this point in the history
  • Loading branch information
laroche committed Jan 29, 2021
1 parent 3a251ea commit 99bb9cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tw-pnl.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ def print_fifos(fifos):
# account-usd should always be the same as total together with
# EURUSD conversion data. So just a sanity check:
def check_total(fifos, total):
for (a, b, c) in fifos['account-usd']:
total -= c / 10000
for (price, price_usd, quantity, date, tax_free) in fifos['account-usd']:
total -= quantity / 10000
if abs(total) > 0.004:
print(total)
raise
Expand Down

0 comments on commit 99bb9cd

Please sign in to comment.