electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 680502cfb8b22b4daa8697701c3f672e2eca0763
parent 3bf2641ce88c0af0341396353e4ce4283d205c3b
Author: ThomasV <thomasv@electrum.org>
Date:   Fri, 29 May 2020 09:57:25 +0200

Qt: copy request to clipboard when it is created

Diffstat:
Melectrum/gui/qt/main_window.py | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py @@ -1078,6 +1078,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): buttons.addWidget(self.clear_invoice_button) buttons.addWidget(self.create_invoice_button) if self.wallet.has_lightning(): + self.create_invoice_button.setText(_('On-chain')) self.create_lightning_invoice_button = QPushButton(_('Lightning')) self.create_lightning_invoice_button.setToolTip('Create lightning request') self.create_lightning_invoice_button.setIcon(read_QIcon("lightning.png")) @@ -1187,6 +1188,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): # clear request fields self.receive_amount_e.setText('') self.receive_message_e.setText('') + # copy to clipboard + r = self.wallet.get_request(key) + content = r.get('invoice', '') if is_lightning else r.get('address', '') + title = _('Invoice') if is_lightning else _('Address') + self.do_copy(content, title=title) def create_bitcoin_request(self, amount, message, expiration): addr = self.wallet.get_unused_address()