From 56124ad15a651961216026ced72fe7ce3fa18a79 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sat, 30 Apr 2022 15:23:47 +0200 Subject: [PATCH] swap_dialog: raise recv_amount when min_mount is received --- electrum/gui/qt/swap_dialog.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qt/swap_dialog.py b/electrum/gui/qt/swap_dialog.py index e97049ea7..d84d1fafe 100644 --- a/electrum/gui/qt/swap_dialog.py +++ b/electrum/gui/qt/swap_dialog.py @@ -88,7 +88,12 @@ class SwapDialog(WindowModalDialog): self.update_signal.connect(self.update) self.update() if recv_amount_sat: - self.recv_amount_e.setAmount(recv_amount_sat) + self.init_recv_amount(recv_amount_sat) + self.update_signal.connect(lambda: self.init_recv_amount(recv_amount_sat)) + + def init_recv_amount(self, recv_amount_sat): + recv_amount_sat = max(recv_amount_sat, self.swap_manager.min_amount) + self.recv_amount_e.setAmount(recv_amount_sat) def fee_slider_callback(self, dyn, pos, fee_rate): if dyn: