mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-30 17:01:34 +00:00
show bitcoin price info in history summary
This commit is contained in:
parent
f6cb26be1f
commit
7cee37dfb8
2 changed files with 9 additions and 5 deletions
|
@ -174,11 +174,13 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop):
|
|||
grid = QGridLayout()
|
||||
grid.addWidget(QLabel(_("Start")), 0, 0)
|
||||
grid.addWidget(QLabel(self.format_date(start_date)), 0, 1)
|
||||
grid.addWidget(QLabel(_("End")), 1, 0)
|
||||
grid.addWidget(QLabel(self.format_date(end_date)), 1, 1)
|
||||
grid.addWidget(QLabel(_("Initial balance")), 2, 0)
|
||||
grid.addWidget(QLabel(format_amount(h['start_balance'])), 2, 1)
|
||||
grid.addWidget(QLabel(str(h.get('start_fiat_balance'))), 2, 2)
|
||||
grid.addWidget(QLabel(str(h['start_fiat_value']) + '/BTC'), 0, 2)
|
||||
grid.addWidget(QLabel(_("Initial balance")), 1, 0)
|
||||
grid.addWidget(QLabel(format_amount(h['start_balance'])), 1, 1)
|
||||
grid.addWidget(QLabel(str(h.get('start_fiat_balance'))), 1, 2)
|
||||
grid.addWidget(QLabel(_("End")), 2, 0)
|
||||
grid.addWidget(QLabel(self.format_date(end_date)), 2, 1)
|
||||
grid.addWidget(QLabel(str(h['end_fiat_value']) + '/BTC'), 2, 2)
|
||||
grid.addWidget(QLabel(_("Final balance")), 4, 0)
|
||||
grid.addWidget(QLabel(format_amount(h['end_balance'])), 4, 1)
|
||||
grid.addWidget(QLabel(str(h.get('end_fiat_balance'))), 4, 2)
|
||||
|
|
|
@ -1128,6 +1128,8 @@ class Abstract_Wallet(PrintError):
|
|||
summary['unrealized_gains'] = Fiat(unrealized, fx.ccy)
|
||||
summary['start_fiat_balance'] = Fiat(fx.historical_value(start_balance, start_date), fx.ccy)
|
||||
summary['end_fiat_balance'] = Fiat(fx.historical_value(end_balance, end_date), fx.ccy)
|
||||
summary['start_fiat_value'] = Fiat(fx.historical_value(COIN, start_date), fx.ccy)
|
||||
summary['end_fiat_value'] = Fiat(fx.historical_value(COIN, end_date), fx.ccy)
|
||||
else:
|
||||
summary = {}
|
||||
return {
|
||||
|
|
Loading…
Add table
Reference in a new issue