1
0

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
This commit is contained in:
SomberNight
2020-11-21 19:35:27 +01:00
parent 756d2eb004
commit 9fced6d2b1

View File

@@ -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