From 392fa9f507c7495e5a1263407eef924612b6642f Mon Sep 17 00:00:00 2001 From: Inso <insomniak.fr@gmail.com> Date: Sun, 15 Feb 2015 14:52:46 +0100 Subject: [PATCH] Fix display issue in InformationTab with differentials values --- src/cutecoin/gui/informations_tab.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cutecoin/gui/informations_tab.py b/src/cutecoin/gui/informations_tab.py index e1002d64..72ddf1d0 100644 --- a/src/cutecoin/gui/informations_tab.py +++ b/src/cutecoin/gui/informations_tab.py @@ -51,7 +51,7 @@ class InformationsTabWidget(QWidget, Ui_InformationsTabWidget): <tr><td align="right"><b>{:2.2%} / {:} days</b></td><td>{:}</td></tr> </table> """.format( - self.get_referential_value(block['dividend']), + self.get_referential_diff_value(block['dividend']), 'Universal Dividend UD(t) in', self.get_referential_name(), self.get_referential_value(block['monetaryMass']), @@ -117,7 +117,7 @@ class InformationsTabWidget(QWidget, Ui_InformationsTabWidget): 'UD(t+1) = MAX { UD(t) ; c * M(t) / N(t) }', 'Universal Dividend (formula)', 'UD(t+1) = MAX {{ {:.2f} {:} ; {:2.0%} * {:.2f} {:} / {:} }}'.format( - self.get_referential_value(block['dividend']), + self.get_referential_diff_value(block['dividend']), self.get_referential_name(), params['c'], self.get_referential_value(block['monetaryMass']), @@ -158,5 +158,8 @@ class InformationsTabWidget(QWidget, Ui_InformationsTabWidget): def get_referential_value(self, value): return self.account.units_to_ref(value, self.community) + def get_referential_diff_value(self, value): + return self.account.units_to_diff_ref(value, self.community) + def get_referential_name(self): return self.account.ref_name(self.community.short_currency) -- GitLab