qt: TxEditor: restructure submarine payment messages
What changed, and why it matters
This commit only changes the order and formatting of user-facing warning messages in the Electrum Qt transaction confirmation dialog. It does not alter any security logic, calculations, or transaction handling. There is no security issue here.
No action needed. This is a non-security UI text/layout change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch restructures three message strings in electrum/gui/qt/confirm_tx_dialog.py for submarine swap payments. It moves amount/liquidity details before the proposed action and adds line breaks for readability. No code behavior, validation, or cryptographic operations are modified.
Changed components
electrum/gui/qt/confirm_tx_dialog.pyInspect captured patch +7 / −5
diff --git a/electrum/gui/qt/confirm_tx_dialog.py b/electrum/gui/qt/confirm_tx_dialog.py
index a4c9b4f..b4ec131 100644
--- a/electrum/gui/qt/confirm_tx_dialog.py
+++ b/electrum/gui/qt/confirm_tx_dialog.py
@@ -1043,14 +1043,16 @@ class TxEditor(WindowModalDialog, QtEventListener, Logger):
if self.expected_onchain_amount_sat < self.swap_manager.get_min_amount():
return '\n'.join([
_("Payment amount below the minimum possible swap amount."),
+ _("Minimum amount: {}").format(f(self.swap_manager.get_min_amount())), "",
_("You need to send a higher amount to be able to do a Submarine Payment."),
- _("Minimum amount: {}").format(f(self.swap_manager.get_min_amount())),
])
- too_low_outbound_liquidity_msg = '\n'.join([
- _("You don't have enough outgoing capacity in your lightning channels."),
+ too_low_outbound_liquidity_msg = ''.join([
+ _("You don't have enough outgoing capacity in your lightning channels."), '\n',
+ _("Your lightning channels can send: {}").format(f(ln_can_send)), '\n',
+ _("For this transaction you need: {}").format(f(self.lightning_send_amount_sat)) if self.lightning_send_amount_sat else '',
+ '\n\n' if self.lightning_send_amount_sat else '\n',
_("To add outgoing capacity you can open a new lightning channel or do a submarine swap."),
- _("Your lightning channels can send: {}").format(f(ln_can_send)),
])
# prioritize showing the swap provider liquidity warning before the channel liquidity warning
@@ -1062,8 +1064,8 @@ class TxEditor(WindowModalDialog, QtEventListener, Logger):
provider_liquidity = 0
msg = [
_("The selected swap provider is unable to offer a forward swap of this value."),
+ _("Available liquidity") + f": {f(provider_liquidity)}", "",
_("In order to continue select a different provider or try to send a smaller amount."),
- _("Available liquidity") + f": {f(provider_liquidity)}",
]
# we don't know exactly how much we need to send on ln yet, so we can assume 0 provider fees
probably_too_low_outbound_liquidity = self.expected_onchain_amount_sat > ln_can_send
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.