1
0

qt, qml: use lowercase bolt11 when copying or sharing

This commit is contained in:
Sander van Grieken
2023-12-04 16:42:49 +01:00
parent a1f3779f8b
commit 24c28409b3
2 changed files with 4 additions and 4 deletions

View File

@@ -244,7 +244,7 @@ ElDialog {
text: 'Copy' text: 'Copy'
onClicked: { onClicked: {
if (request.isLightning && rootLayout.state == 'bolt11') if (request.isLightning && rootLayout.state == 'bolt11')
AppController.textToClipboard(_bolt11) AppController.textToClipboard(_bolt11.toLowerCase())
else if (rootLayout.state == 'bip21uri') else if (rootLayout.state == 'bip21uri')
AppController.textToClipboard(_bip21uri) AppController.textToClipboard(_bip21uri)
else else
@@ -261,7 +261,7 @@ ElDialog {
onClicked: { onClicked: {
enabled = false enabled = false
if (request.isLightning && rootLayout.state == 'bolt11') if (request.isLightning && rootLayout.state == 'bolt11')
AppController.doShare(_bolt11, qsTr('Payment Request')) AppController.doShare(_bolt11.toLowerCase(), qsTr('Payment Request'))
else if (rootLayout.state == 'bip21uri') else if (rootLayout.state == 'bip21uri')
AppController.doShare(_bip21uri, qsTr('Payment Request')) AppController.doShare(_bip21uri, qsTr('Payment Request'))
else else

View File

@@ -223,14 +223,14 @@ class ReceiveTab(QWidget, MessageBoxMixin, Logger):
def on_tab_changed(self): def on_tab_changed(self):
text, data, help_text, title = self.get_tab_data() text, data, help_text, title = self.get_tab_data()
self.window.do_copy(data, title=title) self.window.do_copy(text, title=title)
self.update_receive_qr_window() self.update_receive_qr_window()
def do_copy(self, e): def do_copy(self, e):
if e.button() != Qt.LeftButton: if e.button() != Qt.LeftButton:
return return
text, data, help_text, title = self.get_tab_data() text, data, help_text, title = self.get_tab_data()
self.window.do_copy(data, title=title) self.window.do_copy(text, title=title)
def toggle_receive_qr(self): def toggle_receive_qr(self):
b = not self.config.GUI_QT_RECEIVE_TAB_QR_VISIBLE b = not self.config.GUI_QT_RECEIVE_TAB_QR_VISIBLE