commit d0025491760aab9040ba31e2683adb220fd80345
parent 0c2547543d69a0d9758f9687cb1c00c3569f5926
Author: SomberNight <somber.night@protonmail.com>
Date: Tue, 6 Mar 2018 16:37:17 +0100
wallet.get_full_history: only do fiat calc, if enabled
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/wallet.py b/lib/wallet.py
@@ -1032,7 +1032,7 @@ class Abstract_Wallet(PrintError):
else:
income += value
# fiat computations
- if fx is not None:
+ if fx and fx.is_enabled():
date = timestamp_to_datetime(timestamp)
fiat_value = self.get_fiat_value(tx_hash, fx.ccy)
fiat_default = fiat_value is None
@@ -1069,7 +1069,7 @@ class Abstract_Wallet(PrintError):
'income': Satoshis(income),
'expenditures': Satoshis(expenditures)
}
- if fx:
+ if fx and fx.is_enabled():
unrealized = self.unrealized_gains(domain, fx.timestamp_rate, fx.ccy)
summary['capital_gains'] = Fiat(capital_gains, fx.ccy)
summary['fiat_income'] = Fiat(fiat_income, fx.ccy)