tfix: num_accounts should return only confirmed bip32 accounts - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 7f67b36a19736ade7d1bc3dd6e142fcf95a9fb20 (DIR) parent fa4c2b96d71646a16d3cea45565388dd98fe48e9 (HTM) Author: ThomasV <thomasv@gitorious> Date: Mon, 5 May 2014 12:17:25 +0200 fix: num_accounts should return only confirmed bip32 accounts Diffstat: M lib/account.py | 2 +- M lib/wallet.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) --- (DIR) diff --git a/lib/account.py b/lib/account.py t@@ -71,7 +71,7 @@ class PendingAccount(Account): def dump(self): return {'pending':self.addresses[0]} - def get_name(self): + def get_name(self, k): return _('Pending account') (DIR) diff --git a/lib/wallet.py b/lib/wallet.py t@@ -1391,7 +1391,12 @@ class NewWallet(Deterministic_Wallet): def num_accounts(self): - keys = self.accounts.keys() + keys = [] + for k, v in self.accounts.items(): + if type(v) != BIP32_Account: + continue + keys.append(k) + i = 0 while True: account_id = self.account_id(i)