tFix the backwards-compat 'next_account2' code - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 4743f033b4f1761bb8971b01ca94cee72b671531 DIR parent 5baa5feb114b21147fc36d3df2916455a251da90 HTML Author: Neil Booth <kyuupichan@gmail.com> Date: Sun, 10 Jan 2016 19:26:17 +0900 Fix the backwards-compat 'next_account2' code Diffstat: M lib/wallet.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- DIR diff --git a/lib/wallet.py b/lib/wallet.py t@@ -1666,8 +1666,11 @@ class BIP32_HD_Wallet(BIP32_Wallet): BIP32_Wallet.__init__(self, storage) # Backwards-compatibility. Remove legacy "next_account2" and # drop unused master public key to avoid duplicate errors - storage.put('next_account2', None) - self.master_public_keys.pop(self.next_derivation()[0], None) + acc2 = storage.get('next_account2', None) + if acc2: + storage.put('next_account2', None) + self.master_public_keys.pop(self.root_name + acc2[0] + "'", None) + self.storage.put('master_public_keys', self.master_public_keys) def next_account_number(self): assert (set(self.accounts.keys()) ==