From 1eb375ba80f4cca8efd6cb88eacb080076afbc23 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Fri, 3 Aug 2018 12:29:02 -0400 Subject: [PATCH] add tx.fee property back --- torba/basetransaction.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/torba/basetransaction.py b/torba/basetransaction.py index b74a49fdd..5b5aadde6 100644 --- a/torba/basetransaction.py +++ b/torba/basetransaction.py @@ -293,6 +293,10 @@ class BaseTransaction: def output_sum(self): return sum(o.amount for o in self.outputs) + @property + def fee(self): + return self.input_sum - self.output_sum + def get_base_fee(self, ledger): """ Fee for base tx excluding inputs and outputs. """ return self.base_size * ledger.fee_per_byte