From 24c28409b3790db32d90f1487d96dda5e8e35d27 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Mon, 4 Dec 2023 16:42:49 +0100 Subject: [PATCH] qt, qml: use lowercase bolt11 when copying or sharing --- electrum/gui/qml/components/ReceiveDialog.qml | 4 ++-- electrum/gui/qt/receive_tab.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/electrum/gui/qml/components/ReceiveDialog.qml b/electrum/gui/qml/components/ReceiveDialog.qml index 50f8597ec..5ac80e71e 100644 --- a/electrum/gui/qml/components/ReceiveDialog.qml +++ b/electrum/gui/qml/components/ReceiveDialog.qml @@ -244,7 +244,7 @@ ElDialog { text: 'Copy' onClicked: { if (request.isLightning && rootLayout.state == 'bolt11') - AppController.textToClipboard(_bolt11) + AppController.textToClipboard(_bolt11.toLowerCase()) else if (rootLayout.state == 'bip21uri') AppController.textToClipboard(_bip21uri) else @@ -261,7 +261,7 @@ ElDialog { onClicked: { enabled = false if (request.isLightning && rootLayout.state == 'bolt11') - AppController.doShare(_bolt11, qsTr('Payment Request')) + AppController.doShare(_bolt11.toLowerCase(), qsTr('Payment Request')) else if (rootLayout.state == 'bip21uri') AppController.doShare(_bip21uri, qsTr('Payment Request')) else diff --git a/electrum/gui/qt/receive_tab.py b/electrum/gui/qt/receive_tab.py index c867af9ef..ae46946b3 100644 --- a/electrum/gui/qt/receive_tab.py +++ b/electrum/gui/qt/receive_tab.py @@ -223,14 +223,14 @@ class ReceiveTab(QWidget, MessageBoxMixin, Logger): def on_tab_changed(self): 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() def do_copy(self, e): if e.button() != Qt.LeftButton: return 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): b = not self.config.GUI_QT_RECEIVE_TAB_QR_VISIBLE