electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 9fced6d2b1f22bc3023b7a927776dcfb9d128d30
parent 756d2eb004fde3d0eff4669b35e6f1340dcb09af
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:
Melectrum/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 @@ -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