tQt history list: add tooltip for "local" transactions - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 4682c3a9fcda7f3121b32f4a2cb3aabf957b242a
DIR parent e81283969c254d69c6adc74dc38d4b628fad5a2d
HTML Author: SomberNight <somber.night@protonmail.com>
Date: Sun, 1 Mar 2020 04:19:11 +0100
Qt history list: add tooltip for "local" transactions
closes #5473
Diffstat:
M electrum/gui/qt/history_list.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
DIR diff --git a/electrum/gui/qt/history_list.py b/electrum/gui/qt/history_list.py
t@@ -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)