wallet.delete_contact method
This commit is contained in:
parent
8104a47a3e
commit
6be62e44de
@ -1016,8 +1016,7 @@ class ElectrumWindow(QMainWindow):
|
|||||||
|
|
||||||
def delete_contact(self, x):
|
def delete_contact(self, x):
|
||||||
if self.question(_("Do you want to remove")+" %s "%x +_("from your list of contacts?")):
|
if self.question(_("Do you want to remove")+" %s "%x +_("from your list of contacts?")):
|
||||||
if x in self.wallet.addressbook:
|
self.wallet.delete_contact(x)
|
||||||
self.wallet.addressbook.remove(x)
|
|
||||||
self.set_label(x, None)
|
self.set_label(x, None)
|
||||||
self.update_history_tab()
|
self.update_history_tab()
|
||||||
self.update_contacts_tab()
|
self.update_contacts_tab()
|
||||||
|
|||||||
@ -419,6 +419,11 @@ class Wallet:
|
|||||||
self.labels[address] = label
|
self.labels[address] = label
|
||||||
self.config.set_key('labels', self.labels)
|
self.config.set_key('labels', self.labels)
|
||||||
|
|
||||||
|
def delete_contact(self, addr):
|
||||||
|
if addr in self.addressbook:
|
||||||
|
self.addressbook.remove(addr)
|
||||||
|
self.config.set_key('addressbook', self.addressbook, True)
|
||||||
|
|
||||||
|
|
||||||
def fill_addressbook(self):
|
def fill_addressbook(self):
|
||||||
for tx_hash, tx in self.transactions.items():
|
for tx_hash, tx in self.transactions.items():
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user