From 82c006e0e4fd2019fb47c53acb9dd71ce99dee30 Mon Sep 17 00:00:00 2001 From: f321x Date: Mon, 22 Dec 2025 14:05:07 +0100 Subject: [PATCH] qt: Submarine Payments: update tab on_channels_updated Updates the submarine payments tab if the channels get updated so the user isn't stuck with a liquidity warning if they open the tab before the channels are initialized (e.g. on wallet startup). --- electrum/gui/qt/confirm_tx_dialog.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/electrum/gui/qt/confirm_tx_dialog.py b/electrum/gui/qt/confirm_tx_dialog.py index 2cb4f7fca..9bfcc17fd 100644 --- a/electrum/gui/qt/confirm_tx_dialog.py +++ b/electrum/gui/qt/confirm_tx_dialog.py @@ -873,6 +873,12 @@ class TxEditor(WindowModalDialog, QtEventListener, Logger): def on_event_swap_provider_changed(self): self.update_submarine_tab() + @qt_event_listener + def on_event_channels_updated(self, wallet): + # useful e.g. if the user quickly opens the tab after startup before the channels are initialized + if wallet == self.wallet and self.swap_manager and self.swap_manager.is_initialized.is_set(): + self.update_submarine_tab() + def start_submarine_swap(self): assert self.payee_outputs and len(self.payee_outputs) == 1 payee_output = self.payee_outputs[0]