Browse Source

Qt history list: add tooltip for "local" transactions

closes #5473
hard-fail-on-bad-server-string
SomberNight 5 years ago
parent
commit
4682c3a9fc
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 11
      electrum/gui/qt/history_list.py

11
electrum/gui/qt/history_list.py

@ -181,7 +181,16 @@ class HistoryModel(QAbstractItemModel, Logger):
icon = "lightning" if is_lightning else TX_ICONS[status]
return QVariant(read_QIcon(icon))
elif col == HistoryColumns.STATUS and role == Qt.ToolTipRole:
msg = 'lightning transaction' if is_lightning else str(conf) + _(" confirmation" + ("s" if conf != 1 else ""))
if is_lightning:
msg = 'lightning transaction'
else: # on-chain
if tx_item['height'] == TX_HEIGHT_LOCAL:
# note: should we also explain double-spends?
msg = _("This transaction is only available on your local machine.\n"
"The currently connected server does not know about it.\n"
"You can either broadcast it now, or simply remove it.")
else:
msg = str(conf) + _(" confirmation" + ("s" if conf != 1 else ""))
return QVariant(msg)
elif col > HistoryColumns.DESCRIPTION and role == Qt.TextAlignmentRole:
return QVariant(Qt.AlignRight | Qt.AlignVCenter)

Loading…
Cancel
Save