1
0

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)
This commit is contained in:
SomberNight
2024-09-02 14:54:15 +00:00
parent ae4dd7018b
commit 5f43627b7e

View File

@@ -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))]