URI: 
       tqt send tab: "max" btn should not raise NotEnoughFunds due to fees - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 9fced6d2b1f22bc3023b7a927776dcfb9d128d30
   DIR parent 756d2eb004fde3d0eff4669b35e6f1340dcb09af
  HTML Author: SomberNight <somber.night@protonmail.com>
       Date:   Sat, 21 Nov 2020 19:35:27 +0100
       
       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
       
       Diffstat:
         M electrum/gui/qt/main_window.py      |       9 +++++++--
       
       1 file changed, 7 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py
       t@@ -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