qt receive tab: rename "create onchain" btn to "New Address"
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user