From ad42de03ac75afd6af32fe4c627f1e867fcba3a7 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Thu, 26 May 2022 18:05:18 +0200 Subject: [PATCH] qt new_channel_dialog: fix regression: oepn chan with "max" amt ``` E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter Traceback (most recent call last): File "...\electrum\electrum\gui\qt\channels_list.py", line 377, in new_channel_with_warning self.new_channel_dialog() File "...\electrum\electrum\gui\qt\channels_list.py", line 399, in new_channel_dialog return d.run() File "...\electrum\electrum\gui\qt\new_channel_dialog.py", line 133, in run if self.min_amount_sat and funding_sat < self.min_amount_sat: TypeError: '<' not supported between instances of 'str' and 'int' ``` --- electrum/gui/qt/new_channel_dialog.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/electrum/gui/qt/new_channel_dialog.py b/electrum/gui/qt/new_channel_dialog.py index 672ade941..2564e4537 100644 --- a/electrum/gui/qt/new_channel_dialog.py +++ b/electrum/gui/qt/new_channel_dialog.py @@ -130,9 +130,10 @@ class NewChannelDialog(WindowModalDialog): funding_sat = self.amount_e.get_amount() if not funding_sat: return - if self.min_amount_sat and funding_sat < self.min_amount_sat: - self.window.show_error(_('Amount too low')) - return + if funding_sat != '!': + if self.min_amount_sat and funding_sat < self.min_amount_sat: + self.window.show_error(_('Amount too low')) + return if self.network.channel_db: connect_str = str(self.remote_nodeid.text()).strip() else: