From 9fced6d2b1f22bc3023b7a927776dcfb9d128d30 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Sat, 21 Nov 2020 19:35:27 +0100 Subject: [PATCH] qt send tab: "max" btn should not raise NotEnoughFunds due to fees If a tx cannot be constructed due to current fee settings, try to create one with zero miner fees instead and let user to change the fee later. fixes #6755 --- electrum/gui/qt/main_window.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index a09b59b43..41573bfdd 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -1428,8 +1428,13 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): is_sweep=False) try: - tx = make_tx(None) - except (NotEnoughFunds, NoDynamicFeeEstimates, MultipleSpendMaxTxOutputs) as e: + try: + tx = make_tx(None) + except (NotEnoughFunds, NoDynamicFeeEstimates) as e: + # Check if we had enough funds excluding fees, + # if so, still provide opportunity to set lower fees. + tx = make_tx(0) + except (MultipleSpendMaxTxOutputs, NotEnoughFunds) as e: self.max_button.setChecked(False) self.show_error(str(e)) return