electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 8fbabfd79613a832ea092891ff381f57eab1106b
parent 3f3d249ed1767b14e1c56ebed889c563a9dc912f
Author: ThomasV <thomasv@electrum.org>
Date:   Tue, 10 Oct 2017 11:38:30 +0200

update delete_address for imported wallets

Diffstat:
Mlib/wallet.py | 11++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/lib/wallet.py b/lib/wallet.py @@ -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() @@ -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()