From 3d13d478c921651d5fc5ea07c7e0d3f8a9a01e19 Mon Sep 17 00:00:00 2001 From: f321x Date: Mon, 9 Mar 2026 14:19:36 +0100 Subject: [PATCH] qml: rbf/cancel: abort update if adding tx info fails Early return the update() methods of QETxRbfFeeBumper and QETxCanceller if it fails to fetch missing tx information from the Network to prevent an exception in `Abstract_Wallet.bump_fee()` and `Abstract_Wallet.dscancel()`. See https://github.com/spesmilo/electrum/issues/5502#issuecomment-40213084270 --- electrum/gui/qml/qetxfinalizer.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/electrum/gui/qml/qetxfinalizer.py b/electrum/gui/qml/qetxfinalizer.py index 1d09dcab9..b320b811f 100644 --- a/electrum/gui/qml/qetxfinalizer.py +++ b/electrum/gui/qml/qetxfinalizer.py @@ -758,6 +758,13 @@ class QETxRbfFeeBumper(TxFeeSlider, TxMonMixin): self.validChanged.emit() self.warning = _("The new fee rate needs to be higher than the old fee rate.") return + + if not self._orig_tx.add_info_from_wallet_and_network(wallet=self._wallet.wallet, show_error=self._logger.error): + self._valid = False + self.validChanged.emit() + self.warning = _("Transaction is missing info from network") + return + try: self._tx = self._wallet.wallet.bump_fee( tx=self._orig_tx, @@ -877,6 +884,12 @@ class QETxCanceller(TxFeeSlider, TxMonMixin): self.warning = messages.MSG_RELAYFEE return + if not self._orig_tx.add_info_from_wallet_and_network(wallet=self._wallet.wallet, show_error=self._logger.error): + self._valid = False + self.validChanged.emit() + self.warning = _("Transaction is missing info from network") + return + try: self._tx = self._wallet.wallet.dscancel( tx=self._orig_tx,