summaryrefslogtreecommitdiff
path: root/ledger_process.py
diff options
context:
space:
mode:
authoruvok2025-04-18 19:09:38 +0200
committeruvok2025-04-18 19:09:38 +0200
commit49d5bfc8124f47d91ba12af3fa8fb409f41f479a (patch)
treeee5dade0ea63700aea8f892b920ae215ffafa92a /ledger_process.py
parent5bbd90ec4f25510bb7e07a0911b4cb0a5b2f1333 (diff)
Add fee handling
Diffstat (limited to 'ledger_process.py')
-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