qt: SettingsDialog: update ln fee config on slider moved
What changed, and why it matters
This commit fixes a small user-interface bug in Electrum's Qt settings window. When users adjusted the Lightning Network fee slider by clicking on the slider track (rather than dragging the handle), the chosen fee wasn't saved because the app only saved it when the slider was released after dragging. The fix saves the fee whenever the slider value changes. It is a usability/configuration bug, not a security vulnerability.
No security action required. Treat as a normal bug fix / UI improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch removes the sliderReleased signal handler (lnfee_slider_released) and moves the assignment of self.config.LIGHTNING_PAYMENT_FEE_MAX_MILLIONTHS into the existing valueChanged handler (lnfee_slider_moved). Previously, clicking on the slider track to move the handle changes the value but does not emit sliderReleased, so LIGHTNING_PAYMENT_FEE_MAX_MILLIONTHS was not updated. Now the config is updated on every value change. This is a functional bug fix with no security-relevant code path.
Changed components
electrum/gui/qt/settings_dialog.pyInspect captured patch +0 / −5
diff --git a/electrum/gui/qt/settings_dialog.py b/electrum/gui/qt/settings_dialog.py
index 43cfd0d..bfb9c01 100644
--- a/electrum/gui/qt/settings_dialog.py
+++ b/electrum/gui/qt/settings_dialog.py
@@ -146,10 +146,6 @@ class SettingsDialog(QDialog, QtEventListener):
pos = lnfee_slider.sliderPosition()
fee_val = lnfee_map[pos]
lnfee_update_vlabel(fee_val)
-
- def lnfee_slider_released():
- pos = lnfee_slider.sliderPosition()
- fee_val = lnfee_map[pos]
self.config.LIGHTNING_PAYMENT_FEE_MAX_MILLIONTHS = fee_val
lnfee_slider = QSlider(Qt.Orientation.Horizontal)
@@ -163,7 +159,6 @@ class SettingsDialog(QDialog, QtEventListener):
lnfee_vlabel = QLabel("")
lnfee_update_vlabel(self.config.LIGHTNING_PAYMENT_FEE_MAX_MILLIONTHS)
lnfee_slider.valueChanged.connect(lnfee_slider_moved)
- lnfee_slider.sliderReleased.connect(lnfee_slider_released)
lnfee_hbox = QHBoxLayout()
lnfee_hbox.setContentsMargins(0, 0, 0, 0)
lnfee_hbox.addWidget(lnfee_vlabel)
Why this scored 19/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.