electrum

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

commit 16a326cdd37f1f258a0e761a8c64f7ab60b6c409
parent 3f04520d0f0f5be690075cfa0030375ac2e1b5c6
Author: SomberNight <somber.night@protonmail.com>
Date:   Wed, 18 Nov 2020 18:58:37 +0100

qt receive tab: rename "create onchain" btn to "New Address"

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

diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py @@ -1100,7 +1100,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): self.clear_invoice_button = QPushButton(_('Clear')) self.clear_invoice_button.clicked.connect(self.clear_receive_tab) - self.create_invoice_button = QPushButton(_('Request')) + self.create_invoice_button = QPushButton(_('New Address')) self.create_invoice_button.setIcon(read_QIcon("bitcoin.png")) self.create_invoice_button.setToolTip('Create on-chain request') self.create_invoice_button.clicked.connect(lambda: self.create_invoice(False)) @@ -1109,7 +1109,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_invoice_button.setText(_('New Address')) 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")) @@ -1217,6 +1217,10 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): message = self.receive_message_e.text() expiry = self.config.get('request_expiry', PR_DEFAULT_EXPIRATION_WHEN_CREATING) if is_lightning: + if not self.wallet.lnworker.channels: + self.show_error(_("You need to open a Lightning channel first.")) + return + # TODO maybe show a warning if amount exceeds lnworker.num_sats_can_receive (as in kivy) key = self.wallet.lnworker.add_request(amount, message, expiry) else: key = self.create_bitcoin_request(amount, message, expiry)