From a79be6019e3533b7f62e8765d87409180c826086 Mon Sep 17 00:00:00 2001 From: Petter Date: Sun, 8 Apr 2018 21:34:13 +0200 Subject: [PATCH] Include mining income in total assets --- tax.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tax.py b/tax.py index 4e1db40..14d2fcf 100644 --- a/tax.py +++ b/tax.py @@ -67,6 +67,11 @@ def get_sell_coin(trade:Trade): tax_event = sell_coin.sell(trade.sell_amount, trade.sell_value) if trade.date >= from_date: tax_events.append(tax_event) + + elif trade.type == 'Mining': + buy_coin = get_buy_coin(trade) + if buy_coin: + buy_coin.buy(trade.buy_amount, trade.buy_value) elif trade.type == 'Gift/Tip': buy_coin = get_buy_coin(trade)