Browse Source

qml: add txid not empty assert to removeLocalTx. ref #8775

master
Sander van Grieken 2 years ago
parent
commit
313b79cfaf
No known key found for this signature in database
GPG Key ID: 9BCF8209EA402EBA
  1. 5
      electrum/gui/qml/qetxdetails.py

5
electrum/gui/qml/qetxdetails.py

@ -441,9 +441,10 @@ class QETxDetails(QObject, QtEventListener):
@pyqtSlot() @pyqtSlot()
@pyqtSlot(bool) @pyqtSlot(bool)
def removeLocalTx(self, confirm = False): def removeLocalTx(self, confirm=False):
assert self._can_remove assert self._can_remove, 'cannot remove'
txid = self._txid txid = self._txid
assert txid, 'txid unset'
if not confirm: if not confirm:
num_child_txs = len(self._wallet.wallet.adb.get_depending_transactions(txid)) num_child_txs = len(self._wallet.wallet.adb.get_depending_transactions(txid))

Loading…
Cancel
Save