Only write wallet if necessary
This commit is contained in:
parent
084a352456
commit
c64e8b9885
|
@ -282,8 +282,9 @@ class ElectrumWindow(QMainWindow, PrintError):
|
|||
|
||||
def import_old_contacts(self):
|
||||
# backward compatibility: import contacts
|
||||
addressbook = set(self.wallet.storage.get('contacts', []))
|
||||
for k in addressbook:
|
||||
old_contacts = self.wallet.storage.get('contacts', [])
|
||||
if old_contacts:
|
||||
for k in set(old_contacts):
|
||||
l = self.wallet.labels.get(k)
|
||||
if bitcoin.is_address(k) and l:
|
||||
self.contacts[l] = ('address', k)
|
||||
|
|
Loading…
Reference in New Issue