trustedcoin: qt: set higher minimumHeight for QR component
What changed, and why it matters
This commit is a user-interface tweak for Electrum's two-factor authentication setup. It makes the wizard window taller when showing a QR code so users can also see the text box where they type their one-time code without having to scroll. There is no security flaw here.
No security action needed. Treat as a normal UI improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch adjusts the Qt wizard’s minimumHeight to 530 pixels inside the trustedcoin 2FA confirmation component (WCShowConfirmOTP) and restores the previous height when the user clicks Next or Back. It is purely a UI/UX fix to prevent the OTP input field from being hidden below the fold.
Changed components
electrum/plugins/trustedcoin/qt.pyWCShowConfirmOTP wizard componentInspect captured patch +12 / −0
diff --git a/electrum/plugins/trustedcoin/qt.py b/electrum/plugins/trustedcoin/qt.py
index 93bca30..9b76d74 100644
--- a/electrum/plugins/trustedcoin/qt.py
+++ b/electrum/plugins/trustedcoin/qt.py
@@ -460,6 +460,18 @@ class WCShowConfirmOTP(WalletWizardComponent):
self.wizard.trustedcoin_qhelper.otpError.connect(self.on_otp_error)
self.wizard.trustedcoin_qhelper.remoteKeyError.connect(self.on_remote_key_error)
+ # set higher minHeight so the qr code and the input field are shown without scrolling
+ prev_height = self.wizard.height()
+ prev_min_height = self.wizard.minimumHeight()
+ def restore_prev_height():
+ self.wizard.setMinimumHeight(prev_min_height)
+ self.wizard.resize(self.wizard.width(), prev_height)
+ self.wizard.next_button.clicked.disconnect(restore_prev_height)
+ self.wizard.back_button.clicked.disconnect(restore_prev_height)
+ self.wizard.setMinimumHeight(530)
+ self.wizard.next_button.clicked.connect(restore_prev_height)
+ self.wizard.back_button.clicked.connect(restore_prev_height)
+
self._is_online_continuation = 'seed' not in self.wizard_data
if self._is_online_continuation:
self.knownsecretlabel.setText(_('Authenticate below to finalize wallet creation'))
Why this scored 20/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.