Browse Source

ui, fix payment failed

patch-4
Sander van Grieken 2 years ago
parent
commit
dd58328534
  1. 6
      electrum/gui/qml/components/ReceiveDetailsDialog.qml
  2. 9
      electrum/gui/qml/components/ReceiveDialog.qml
  3. 4
      electrum/gui/qml/components/SendDialog.qml
  4. 6
      electrum/gui/qml/components/WalletMainView.qml
  5. 2
      electrum/gui/qml/qewallet.py

6
electrum/gui/qml/components/ReceiveDetailsDialog.qml

@ -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"
}

9
electrum/gui/qml/components/ReceiveDialog.qml

@ -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)

4
electrum/gui/qml/components/SendDialog.qml

@ -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()

6
electrum/gui/qml/components/WalletMainView.qml

@ -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()
}
}

2
electrum/gui/qml/qewallet.py

@ -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()

Loading…
Cancel
Save