What changed, and why it matters
This commit removes a UI restriction in Electrum's swap dialog. Previously, when opening a submarine swap from the receive tab with a pre-set amount, the amount fields and Max button were disabled, forcing the user to swap exactly that amount. The change keeps those fields editable so users can adjust the swap amount if they want a larger or different swap. It also tweaks an error message to clarify that a swap may not be possible with the current provider. There is no security issue here.
No security action needed. This is a normal usability improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In electrum/gui/qt/swap_dialog.py, three lines that disabled send_amount_e, recv_amount_e, and max_button when recv_amount_sat was provided are removed. The textEdited signals already connect to uncheck_max(), so user edits remain consistent. A user-facing string is updated to say ‘No {reverse|forward} swap possible with this provider’ instead of ‘with this provider’ being implied. The change is purely UX/policy and does not touch cryptographic, networking, or transaction-construction logic.
Changed components
electrum/gui/qt/swap_dialog.pyInspect captured patch +1 / −4
diff --git a/electrum/gui/qt/swap_dialog.py b/electrum/gui/qt/swap_dialog.py
index 19de6be..49680a4 100644
--- a/electrum/gui/qt/swap_dialog.py
+++ b/electrum/gui/qt/swap_dialog.py
@@ -81,9 +81,6 @@ class SwapDialog(WindowModalDialog, QtEventListener):
# textEdited is triggered only for user editing of the fields
self.send_amount_e.textEdited.connect(self.uncheck_max)
self.recv_amount_e.textEdited.connect(self.uncheck_max)
- self.send_amount_e.setEnabled(recv_amount_sat is None)
- self.recv_amount_e.setEnabled(recv_amount_sat is None)
- self.max_button.setEnabled(recv_amount_sat is None)
self.fee_policy = FeePolicy(self.config.FEE_POLICY)
self.fee_slider = FeeSlider(parent=self, network=self.network, fee_policy=self.fee_policy, callback=self.fee_slider_callback)
@@ -282,7 +279,7 @@ class SwapDialog(WindowModalDialog, QtEventListener):
min_swap_limit, max_swap_limit = self.get_client_swap_limits_sat()
if max_swap_limit == 0:
swap_name = _("reverse") if self.is_reverse else _("forward")
- swap_limit_str = _("No {} swap possible").format(swap_name)
+ swap_limit_str = _("No {} swap possible with this provider").format(swap_name)
else:
swap_limit_str = (f"{self.window.format_amount(min_swap_limit)} - "
f"{self.window.format_amount(max_swap_limit)} {w_base_unit}")
Why this scored 15/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.