From 3dffd3e0b5dedbbbb1c81a71c9be09d5933997da Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Mon, 15 Aug 2022 14:06:56 +0200 Subject: [PATCH] qml: don't implicitly send_onchain from ConfirmTxDialog, externalize --- electrum/gui/qml/components/ConfirmTxDialog.qml | 3 --- electrum/gui/qml/components/OpenChannel.qml | 3 +++ electrum/gui/qml/components/Send.qml | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/electrum/gui/qml/components/ConfirmTxDialog.qml b/electrum/gui/qml/components/ConfirmTxDialog.qml index f472f0ff2..ffd2abfea 100644 --- a/electrum/gui/qml/components/ConfirmTxDialog.qml +++ b/electrum/gui/qml/components/ConfirmTxDialog.qml @@ -252,9 +252,6 @@ ElDialog { enabled: finalizer.valid onClicked: { txaccepted() - if (!Daemon.currentWallet.isWatchOnly) { - finalizer.send_onchain() - } dialog.close() } } diff --git a/electrum/gui/qml/components/OpenChannel.qml b/electrum/gui/qml/components/OpenChannel.qml index cfb6bf6f6..2aec76108 100644 --- a/electrum/gui/qml/components/OpenChannel.qml +++ b/electrum/gui/qml/components/OpenChannel.qml @@ -180,6 +180,9 @@ Pane { var dialog = confirmOpenChannelDialog.createObject(root, { 'satoshis': channelopener.amount }) + dialog.txaccepted.connect(function() { + dialog.finalizer.send_onchain() + }) dialog.open() } onChannelOpening: { diff --git a/electrum/gui/qml/components/Send.qml b/electrum/gui/qml/components/Send.qml index 183c202c6..fc6f97e15 100644 --- a/electrum/gui/qml/components/Send.qml +++ b/electrum/gui/qml/components/Send.qml @@ -171,6 +171,8 @@ Pane { rootItem.clear() if (Daemon.currentWallet.isWatchOnly) { showUnsignedTx(dialog.finalizer.serializedTx()) + } else { + dialog.finalizer.send_onchain() } }) dialog.open() @@ -281,6 +283,8 @@ Pane { dialog.txaccepted.connect(function() { if (Daemon.currentWallet.isWatchOnly) { showUnsignedTx(dialog.finalizer.serializedTx()) + } else { + dialog.finalizer.send_onchain() } }) dialog.open()