|
|
@ -907,6 +907,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): |
|
|
|
msg = _('Bitcoin address where the payment should be received. Note that each payment request uses a different Bitcoin address.') |
|
|
|
self.receive_address_label = HelpLabel(_('Receiving address'), msg) |
|
|
|
self.receive_address_e.textChanged.connect(self.update_receive_qr) |
|
|
|
self.receive_address_e.textChanged.connect(self.update_receive_address_styling) |
|
|
|
self.receive_address_e.setFocusPolicy(Qt.ClickFocus) |
|
|
|
grid.addWidget(self.receive_address_label, 0, 0) |
|
|
|
grid.addWidget(self.receive_address_e, 0, 1, 1, -1) |
|
|
@ -1152,6 +1153,16 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): |
|
|
|
if self.qr_window and self.qr_window.isVisible(): |
|
|
|
self.qr_window.qrw.setData(uri) |
|
|
|
|
|
|
|
def update_receive_address_styling(self): |
|
|
|
addr = str(self.receive_address_e.text()) |
|
|
|
if self.wallet.is_used(addr): |
|
|
|
self.receive_address_e.setStyleSheet(ColorScheme.RED.as_stylesheet(True)) |
|
|
|
self.receive_address_e.setToolTip(_("This address has already been used. " |
|
|
|
"For better privacy, do not reuse it for new payments.")) |
|
|
|
else: |
|
|
|
self.receive_address_e.setStyleSheet("") |
|
|
|
self.receive_address_e.setToolTip("") |
|
|
|
|
|
|
|
def set_feerounding_text(self, num_satoshis_added): |
|
|
|
self.feerounding_text = (_('Additional {} satoshis are going to be added.') |
|
|
|
.format(num_satoshis_added)) |
|
|
|