Browse Source

qml: remove bolt11 invoice from qelnpaymentdetails/LightningPaymentDetails

master
Sander van Grieken 3 years ago
parent
commit
94fd0dcf10
  1. 36
      electrum/gui/qml/components/LightningPaymentDetails.qml
  2. 12
      electrum/gui/qml/qelnpaymentdetails.py

36
electrum/gui/qml/components/LightningPaymentDetails.qml

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

12
electrum/gui/qml/qelnpaymentdetails.py

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

Loading…
Cancel
Save