tqt send: handle simultaneous NoDynamicFeeEstimates+NotEnoughFunds - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 1b3674b318233c623cdd8692d693e63a8dc61ce1 DIR parent 90d66953cfd53f1a055709fe99f25d23d0a190c7 HTML Author: SomberNight <somber.night@protonmail.com> Date: Wed, 20 Jan 2021 16:25:03 +0100 qt send: handle simultaneous NoDynamicFeeEstimates+NotEnoughFunds fixes #6424 Diffstat: M electrum/gui/qt/confirm_tx_dialog.… | 3 +++ M electrum/gui/qt/transaction_dialog… | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) --- DIR diff --git a/electrum/gui/qt/confirm_tx_dialog.py b/electrum/gui/qt/confirm_tx_dialog.py t@@ -101,6 +101,9 @@ class TxEditor: self.tx = None try: self.tx = self.make_tx(0) + except NotEnoughFunds: + self.not_enough_funds = True + return except BaseException: return except InternalAddressCorruption as e: DIR diff --git a/electrum/gui/qt/transaction_dialog.py b/electrum/gui/qt/transaction_dialog.py t@@ -831,8 +831,9 @@ class PreviewTxDialog(BaseTxDialog, TxEditor): def update_fee_fields(self): freeze_fee = self.is_send_fee_frozen() freeze_feerate = self.is_send_feerate_frozen() - if self.no_dynfee_estimates: - size = self.tx.estimated_size() + tx = self.tx + if self.no_dynfee_estimates and tx: + size = tx.estimated_size() self.size_e.setAmount(size) if self.not_enough_funds or self.no_dynfee_estimates: if not freeze_fee: t@@ -842,7 +843,7 @@ class PreviewTxDialog(BaseTxDialog, TxEditor): self.feerounding_icon.setVisible(False) return - tx = self.tx + assert tx is not None size = tx.estimated_size() fee = tx.get_fee()