qml: remove bolt11 invoice from qelnpaymentdetails/LightningPaymentDetails

This commit is contained in:
Sander van Grieken
2023-03-03 13:40:31 +01:00
parent 0f596cf2e9
commit 94fd0dcf10
2 changed files with 0 additions and 48 deletions

View File

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

View File

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