diff --git a/electrum/gui/qt/confirm_tx_dialog.py b/electrum/gui/qt/confirm_tx_dialog.py index b67036be1..091f578cf 100644 --- a/electrum/gui/qt/confirm_tx_dialog.py +++ b/electrum/gui/qt/confirm_tx_dialog.py @@ -104,7 +104,13 @@ class TxEditor: if use_rbf: self.tx.set_rbf(True) - + def have_enough_funds_assuming_zero_fees(self) -> bool: + try: + tx = self.make_tx(0) + except NotEnoughFunds: + return False + else: + return True diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index 70afddf41..fcda37791 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -1594,8 +1594,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): output_value = '!' if '!' in output_values else sum(output_values) d = ConfirmTxDialog(window=self, make_tx=make_tx, output_value=output_value, is_sweep=is_sweep) if d.not_enough_funds: - self.show_message(_('Not Enough Funds')) - return + # Check if we had enough funds excluding fees, + # if so, still provide opportunity to set lower fees. + if not d.have_enough_funds_assuming_zero_fees(): + self.show_message(_('Not Enough Funds')) + return cancelled, is_send, password, tx = d.run() if cancelled: return