twallet: override get_addresses in Imported_Wallet so that clear_history works - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 9228cb5b8ed06317fe51a3e21708c0ba95e0e115 (DIR) parent 2a9f5db5769e52958bc3c4f94ca53d58a8baf9d7 (HTM) Author: SomberNight <somber.night@protonmail.com> Date: Fri, 3 Aug 2018 19:56:35 +0200 wallet: override get_addresses in Imported_Wallet so that clear_history works Diffstat: M electrum/wallet.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- (DIR) diff --git a/electrum/wallet.py b/electrum/wallet.py t@@ -1219,6 +1219,10 @@ class Imported_Wallet(Simple_Wallet): def get_fingerprint(self): return '' + def get_addresses(self): + # note: overridden so that the history can be cleared + return sorted(self.addresses.keys()) + def get_receiving_addresses(self): return self.get_addresses() t@@ -1351,7 +1355,8 @@ class Deterministic_Wallet(Abstract_Wallet): return self.keystore.has_seed() def get_addresses(self): - # overloaded so that addresses are ordered based on derivation + # note: overridden so that the history can be cleared. + # addresses are ordered based on derivation out = [] out += self.get_receiving_addresses() out += self.get_change_addresses()