qml: show pay_invoice error to user
This commit is contained in:
@@ -306,6 +306,12 @@ Item {
|
||||
})
|
||||
dialog.open()
|
||||
}
|
||||
function onPaymentFailed(invoice_id, message) {
|
||||
var dialog = app.messageDialog.createObject(app, {
|
||||
text: message
|
||||
})
|
||||
dialog.open()
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
|
||||
@@ -609,7 +609,8 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
|
||||
fut = asyncio.run_coroutine_threadsafe(coro, get_asyncio_loop())
|
||||
fut.result()
|
||||
except Exception as e:
|
||||
self.paymentFailed.emit(invoice.get_id(), repr(e))
|
||||
self._logger.error(f'pay_invoice failed! {e!r}')
|
||||
self.paymentFailed.emit(invoice.get_id(), str(e))
|
||||
|
||||
threading.Thread(target=pay_thread, daemon=True).start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user