1
0

ui, fix payment failed

This commit is contained in:
Sander van Grieken
2022-09-27 11:43:28 +02:00
parent d50d83e186
commit dd58328534
5 changed files with 15 additions and 12 deletions

View File

@@ -11,18 +11,16 @@ import "controls"
ElDialog {
id: dialog
title: qsTr('Edit payment request details')
property alias amount: amountBtc.text
property alias description: message.text
property alias expiry: expires.currentValue
parent: Overlay.overlay
modal: true
standardButtons: Dialog.Close
implicitWidth: parent.width
height: parent.height
Overlay.modal: Rectangle {
color: "#aa000000"
}

View File

@@ -11,6 +11,8 @@ import "controls"
ElDialog {
id: dialog
title: qsTr('Receive Payment')
property string _bolt11: request.bolt11
property string _bip21uri: request.bip21
property string _address: request.address
@@ -21,9 +23,6 @@ ElDialog {
modal: true
standardButtons: Dialog.Close
width: parent.width
height: parent.height
Overlay.modal: Rectangle {
color: "#aa000000"
}
@@ -261,6 +260,10 @@ ElDialog {
ReceiveDetailsDialog {
id: receiveDetailsDialog
width: parent.width * 0.9
anchors.centerIn: parent
onAccepted: {
console.log('accepted')
Daemon.currentWallet.delete_request(request.key)

View File

@@ -16,9 +16,6 @@ ElDialog {
modal: true
standardButtons: Dialog.Close
width: parent.width
height: parent.height
Overlay.modal: Rectangle {
color: "#aa000000"
}
@@ -42,7 +39,6 @@ ElDialog {
onClicked: {
var _mid = manualInputDialog.createObject(mainView)
_mid.accepted.connect(function() {
console.log(_mid.recipient)
invoiceParser.recipient = _mid.recipient
})
_mid.open()

View File

@@ -215,6 +215,9 @@ Item {
Component {
id: sendDialog
SendDialog {
width: parent.width
height: parent.height
onClosed: destroy()
}
}
@@ -222,6 +225,9 @@ Item {
Component {
id: receiveDialog
ReceiveDialog {
width: parent.width
height: parent.height
onClosed: destroy()
}
}

View File

@@ -464,7 +464,7 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
fut = asyncio.run_coroutine_threadsafe(coro, self.wallet.network.asyncio_loop)
fut.result()
except Exception as e:
self.userNotify.emit(self.wallet, repr(e))
self.paymentFailed.emit(invoice.get_id(), repr(e))
threading.Thread(target=pay_thread).start()