tupdate delete_address for imported wallets - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 8fbabfd79613a832ea092891ff381f57eab1106b DIR parent 3f3d249ed1767b14e1c56ebed889c563a9dc912f HTML Author: ThomasV <thomasv@electrum.org> Date: Tue, 10 Oct 2017 11:38:30 +0200 update delete_address for imported wallets Diffstat: M lib/wallet.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) --- DIR diff --git a/lib/wallet.py b/lib/wallet.py t@@ -1419,7 +1419,11 @@ class Imported_Wallet(Abstract_Wallet): def delete_address(self, address): if address not in self.addresses: return + pubkey = self.get_public_key(address) self.addresses.pop(address) + if pubkey: + self.keystore.delete_imported_key(pubkey) + self.save_keystore() self.storage.put('addresses', self.addresses) self.storage.write() t@@ -1680,13 +1684,6 @@ class Simple_Deterministic_Wallet(Deterministic_Wallet): def save_keystore(self): self.storage.put('keystore', self.keystore.dump()) - def delete_address(self, address): - pubkey = self.get_public_key(address) - self.keystore.delete_imported_key(pubkey) - self.save_keystore() - self.receiving_addresses.remove(address) - self.save_addresses() - self.storage.write()