summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ledger_process.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ledger_process.py b/ledger_process.py
index d5199a6..d6b31fa 100644
--- a/ledger_process.py
+++ b/ledger_process.py
@@ -58,9 +58,9 @@ class LedgerProcess:
t = self.external_wallet[currency].remove(lambda t: t.amount == action.amount)
- # TODO: Fee handling
- assert action.fee == 0
+ # Fee handling: Kraken shows "full" amount first, I have to subtract the fee.
wallet = self.fifo_queues[currency]
+ t.remove_coins(action.fee)
wallet.add_trade(t)
# TODO: Sort