diff --git a/electrum/gui/qml/components/ConfirmPaymentDialog.qml b/electrum/gui/qml/components/ConfirmTxDialog.qml similarity index 91% rename from electrum/gui/qml/components/ConfirmPaymentDialog.qml rename to electrum/gui/qml/components/ConfirmTxDialog.qml index a0f04cd2b..3e2ef3161 100644 --- a/electrum/gui/qml/components/ConfirmPaymentDialog.qml +++ b/electrum/gui/qml/components/ConfirmTxDialog.qml @@ -10,15 +10,22 @@ import "controls" Dialog { id: dialog - property alias address: finalizer.address - property alias satoshis: finalizer.amount + required property QtObject finalizer + required property Amount satoshis + property string address property string message + property alias amountLabelText: amountLabel.text + property alias sendButtonText: sendButton.text + + title: qsTr('Confirm Transaction') + + // copy these to finalizer + onAddressChanged: finalizer.address = address + onSatoshisChanged: finalizer.amount = satoshis width: parent.width height: parent.height - title: qsTr('Confirm Payment') - modal: true parent: Overlay.overlay Overlay.modal: Rectangle { @@ -39,6 +46,7 @@ Dialog { } Label { + id: amountLabel text: qsTr('Amount to send') } @@ -202,6 +210,7 @@ Dialog { } Button { + id: sendButton text: qsTr('Pay') enabled: finalizer.valid onClicked: { @@ -212,9 +221,4 @@ Dialog { } } - TxFinalizer { - id: finalizer - wallet: Daemon.currentWallet - onAmountChanged: console.log(amount.satsInt) - } } diff --git a/electrum/gui/qml/components/Send.qml b/electrum/gui/qml/components/Send.qml index 06d614617..495656a58 100644 --- a/electrum/gui/qml/components/Send.qml +++ b/electrum/gui/qml/components/Send.qml @@ -217,7 +217,13 @@ Pane { Component { id: confirmPaymentDialog - ConfirmPaymentDialog {} + ConfirmTxDialog { + title: qsTr('Confirm Payment') + finalizer: TxFinalizer { + wallet: Daemon.currentWallet + onAmountChanged: console.log(amount.satsInt) + } + } } Component {