qml: remove bolt11 invoice from qelnpaymentdetails/LightningPaymentDetails
This commit is contained in:
@@ -195,42 +195,6 @@ Pane {
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Lightning invoice')
|
||||
Layout.columnSpan: 2
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
TextHighlightPane {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: lnpaymentdetails.invoice
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
font.family: FixedFont
|
||||
wrapMode: Text.Wrap
|
||||
maximumLineCount: 3
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
ToolButton {
|
||||
icon.source: '../../icons/share.png'
|
||||
icon.color: enabled ? 'transparent' : constants.mutedForeground
|
||||
enabled: lnpaymentdetails.invoice != ''
|
||||
onClicked: {
|
||||
var dialog = app.genericShareDialog.createObject(root,
|
||||
{ title: qsTr('Lightning Invoice'), text: lnpaymentdetails.invoice }
|
||||
)
|
||||
dialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -72,10 +72,6 @@ class QELnPaymentDetails(QObject):
|
||||
def preimage(self):
|
||||
return self._preimage
|
||||
|
||||
@pyqtProperty(str, notify=detailsChanged)
|
||||
def invoice(self):
|
||||
return self._invoice
|
||||
|
||||
@pyqtProperty(QEAmount, notify=detailsChanged)
|
||||
def amount(self):
|
||||
return self._amount
|
||||
@@ -101,12 +97,4 @@ class QELnPaymentDetails(QObject):
|
||||
self._phash = tx['payment_hash']
|
||||
self._preimage = tx['preimage']
|
||||
|
||||
invoice = (self._wallet.wallet.get_invoice(self._key)
|
||||
or self._wallet.wallet.get_request(self._key))
|
||||
self._logger.debug(str(invoice))
|
||||
if invoice:
|
||||
self._invoice = invoice.lightning_invoice or ''
|
||||
else:
|
||||
self._invoice = ''
|
||||
|
||||
self.detailsChanged.emit()
|
||||
|
||||
Reference in New Issue
Block a user