1
0

qml: show QR when finalized and saved

This commit is contained in:
Sander van Grieken
2023-01-13 22:39:01 +01:00
parent 3b7a09a307
commit b7106fd746
4 changed files with 15 additions and 6 deletions

View File

@@ -69,8 +69,8 @@ Pane {
RowLayout {
Image {
visible: Network.isProxyTor
Layout.preferredWidth: constants.iconSizeSmall
Layout.preferredHeight: constants.iconSizeSmall
Layout.preferredWidth: constants.iconSizeMedium
Layout.preferredHeight: constants.iconSizeMedium
source: '../../icons/tor_logo.png'
}
Label {

View File

@@ -24,6 +24,11 @@ Pane {
app.stack.pop()
}
function showExport() {
var dialog = exportTxDialog.createObject(root, { txdetails: txdetails })
dialog.open()
}
ColumnLayout {
anchors.fill: parent
spacing: 0

View File

@@ -313,7 +313,12 @@ Item {
finalizer: TxFinalizer {
wallet: Daemon.currentWallet
canRbf: true
onFinished: _confirmPaymentDialog.destroy()
onFinishedSave: {
// tx was (partially) signed and saved. Show QR for co-signers or online wallet
var page = app.stack.push(Qt.resolvedUrl('TxDetails.qml'), { txid: txid })
page.showExport()
_confirmPaymentDialog.destroy()
}
}
}
}

View File

@@ -220,7 +220,7 @@ class TxFeeSlider(FeeSlider):
class QETxFinalizer(TxFeeSlider):
_logger = get_logger(__name__)
finished = pyqtSignal()
finishedSave = pyqtSignal([str], arguments=['txid'])
def __init__(self, parent=None, *, make_tx=None, accept=None):
super().__init__(parent)
@@ -352,7 +352,6 @@ class QETxFinalizer(TxFeeSlider):
return
self._wallet.sign(self._tx, broadcast=True)
self.finished.emit()
@pyqtSlot()
def signAndSave(self):
@@ -383,7 +382,7 @@ class QETxFinalizer(TxFeeSlider):
if not self._wallet.wallet.adb.add_transaction(self._tx):
self._logger.error('Could not save tx')
self.finished.emit()
self.finishedSave.emit(self._tx.txid())
@pyqtSlot(result=str)
@pyqtSlot(bool, result=str)