From a54751ee4f013ed8355029234f1c9e4df03fed73 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Mon, 2 Sep 2024 14:54:15 +0000 Subject: [PATCH] gui: qt: tx dialog: add option to copy scriptpubkey of output if there is no corresponding address (otherwise due to "..." elision, the full spk would be inaccessible) --- electrum/gui/qt/transaction_dialog.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/electrum/gui/qt/transaction_dialog.py b/electrum/gui/qt/transaction_dialog.py index eb3b80694..97f7d8a05 100644 --- a/electrum/gui/qt/transaction_dialog.py +++ b/electrum/gui/qt/transaction_dialog.py @@ -388,6 +388,9 @@ class TxInOutWidget(QWidget): if self.wallet.is_mine(addr): show_list += [(_("Address Details"), lambda: self.main_window.show_address(addr, parent=self))] copy_list += [(_("Copy Address"), lambda: self.main_window.do_copy(addr))] + else: + spk = self.tx.outputs()[txout_idx].scriptpubkey + copy_list += [(_("Copy scriptPubKey"), lambda: self.main_window.do_copy(spk.hex()))] txout_value = self.tx.outputs()[txout_idx].value value_str = self.main_window.format_amount(txout_value, add_thousands_sep=False) copy_list += [(_("Copy Amount"), lambda: self.main_window.do_copy(value_str))]