From 2ec4758a1253a9937bff8f60251bb0b0e0b9cd0c Mon Sep 17 00:00:00 2001 From: SomberNight Date: Fri, 21 Apr 2023 17:14:49 +0000 Subject: [PATCH] qml: follow-up fix for offline-signing pre-segwit tx follow-up 3cec6cdcfb87dd1331f6904a08e890b2d8cb6bb2 --- electrum/gui/qml/components/WalletMainView.qml | 2 +- electrum/gui/qml/qetxfinalizer.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/electrum/gui/qml/components/WalletMainView.qml b/electrum/gui/qml/components/WalletMainView.qml index 0a7d3de38..4dec7ca0a 100644 --- a/electrum/gui/qml/components/WalletMainView.qml +++ b/electrum/gui/qml/components/WalletMainView.qml @@ -328,7 +328,7 @@ Item { dialog.accepted.connect(function() { if (!canComplete) { if (Daemon.currentWallet.isWatchOnly) { - dialog.finalizer.save() + dialog.finalizer.saveOrShow() } else { dialog.finalizer.sign() } diff --git a/electrum/gui/qml/qetxfinalizer.py b/electrum/gui/qml/qetxfinalizer.py index 659b4386b..36e129dda 100644 --- a/electrum/gui/qml/qetxfinalizer.py +++ b/electrum/gui/qml/qetxfinalizer.py @@ -343,15 +343,15 @@ class QETxFinalizer(TxFeeSlider): self.validChanged.emit() @pyqtSlot() - def save(self): - if not self._valid or not self._tx or not self._tx.txid(): - self._logger.debug('no valid tx or no txid') + def saveOrShow(self): + if not self._valid or not self._tx: + self._logger.debug('no valid tx') return saved = False - if self._wallet.save_tx(self._tx): - saved = True - # self.finishedSave.emit(self._tx.txid()) + if self._tx.txid(): + if self._wallet.save_tx(self._tx): + saved = True self.finished.emit(False, saved, self._tx.is_complete())