From a105c500295b7716b4b7c6da51b9f5da35055e68 Mon Sep 17 00:00:00 2001 From: f321x Date: Tue, 16 Dec 2025 13:54:08 +0100 Subject: [PATCH] qt: trustedcoin: only allow signing with broadcast Only allow signing a transaction if it also gets broadcast by disabling the signing and broadcast button of the preview dialog when creating a new tx. Makes it slightly less trivial to cheat with the fees. --- electrum/gui/qt/send_tab.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qt/send_tab.py b/electrum/gui/qt/send_tab.py index b3bdbd60e..bff1b458f 100644 --- a/electrum/gui/qt/send_tab.py +++ b/electrum/gui/qt/send_tab.py @@ -370,7 +370,13 @@ class SendTab(QWidget, MessageBoxMixin, Logger): tx.swap_payment_hash = swap.payment_hash if is_preview: - self.window.show_transaction(tx, external_keypairs=external_keypairs, invoice=invoice) + self.window.show_transaction( + tx, + external_keypairs=external_keypairs, + invoice=invoice, + show_sign_button=self.wallet.wallet_type != '2fa', + show_broadcast_button=self.wallet.wallet_type != '2fa', + ) return self.save_pending_invoice() def sign_done(success):