From 401d8bc534cea5838206fea41a4d818f14a0b0e0 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Tue, 10 Oct 2017 11:48:27 +0200 Subject: [PATCH] fix #2890 --- gui/qt/main_window.py | 6 +++--- lib/wallet.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index 0eb7fbd9..56877f3e 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -947,9 +947,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.receive_amount_e.setAmount(None) def clear_receive_tab(self): - addr = self.wallet.get_receiving_address() - if addr: - self.receive_address_e.setText(addr) + addr = self.wallet.get_receiving_address() or '' + self.receive_address_e.setText(addr) self.receive_message_e.setText('') self.receive_amount_e.setAmount(None) self.expires_label.hide() @@ -1599,6 +1598,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.wallet.delete_address(addr) self.address_list.update() self.history_list.update() + self.clear_receive_tab() def get_coins(self): if self.pay_from: diff --git a/lib/wallet.py b/lib/wallet.py index 90f4dc97..43235415 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -1375,7 +1375,7 @@ class Imported_Wallet(Abstract_Wallet): return self.is_watching_only() def can_delete_address(self): - return self.is_watching_only() + return True def has_seed(self): return False