From e476e602470e7c42c238df5352af26971ae362fb Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Fri, 31 Mar 2023 12:47:43 +0200 Subject: [PATCH] qml: add note regarding validity of qetxdetails instance and reset tx/txid members --- electrum/gui/qml/qetxdetails.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/electrum/gui/qml/qetxdetails.py b/electrum/gui/qml/qetxdetails.py index 3349ce8c7..a4ba47971 100644 --- a/electrum/gui/qml/qetxdetails.py +++ b/electrum/gui/qml/qetxdetails.py @@ -381,6 +381,11 @@ class QETxDetails(QObject, QtEventListener): self._wallet.wallet.adb.remove_transaction(txid) self._wallet.wallet.save_db() + # NOTE: from here, the tx/txid is unknown and all properties are invalid. + # UI should close TxDetails and avoid interacting with this qetxdetails instance. + self._txid = None + self._tx = None + @pyqtSlot() def save(self): if not self._tx: