From 663900270c33675f184e25f710c26d87dc2ec989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Mon, 16 Jun 2025 17:16:06 +0200 Subject: [PATCH] Only compute short_id when requested --- electrum/gui/qt/history_list.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/electrum/gui/qt/history_list.py b/electrum/gui/qt/history_list.py index 4d7425301..82119f2f8 100644 --- a/electrum/gui/qt/history_list.py +++ b/electrum/gui/qt/history_list.py @@ -124,9 +124,10 @@ class HistoryNode(CustomNode): status_str = format_time(int(timestamp)) else: tx_hash = tx_item['txid'] - txpos_in_block = tx_item.get('txpos_in_block') - if txpos_in_block is not None and txpos_in_block >= 0: - short_id = f"{tx_item['height']}x{txpos_in_block}" + if col == HistoryColumns.SHORT_ID: + txpos_in_block = tx_item.get('txpos_in_block', -1) + if txpos_in_block >= 0: + short_id = f"{tx_item['height']}x{txpos_in_block}" conf = tx_item['confirmations'] try: status, status_str = self.model.tx_status_cache[tx_hash]