tRevert "Sweep keys: don't default to hidden address" - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 83a531b3e4c18e3bd418b205aa7da0511dee1f73 DIR parent 605cc47a3d565ba84ed4305cf52d238a0d9d09df HTML Author: Neil Booth <kyuupichan@gmail.com> Date: Sat, 23 Jan 2016 17:32:43 +0900 Revert "Sweep keys: don't default to hidden address" This reverts commit 605cc47a3d565ba84ed4305cf52d238a0d9d09df. Diffstat: M lib/wallet.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) --- DIR diff --git a/lib/wallet.py b/lib/wallet.py t@@ -666,13 +666,10 @@ class Abstract_Wallet(PrintError): amount = max(0, sendable - fee) return amount, fee - def default_account_id(self): - return self.accounts.keys()[0] - def get_account_addresses(self, acc_id, include_change=True): if acc_id is None: - acc_id = self.default_account_id() - if acc_id in self.accounts: + addr_list = self.addresses(include_change) + elif acc_id in self.accounts: acc = self.accounts[acc_id] addr_list = acc.get_addresses(0) if include_change: t@@ -1693,11 +1690,6 @@ class BIP32_HD_Wallet(BIP32_RD_Wallet): set(['%d' % n for n in range(len(self.accounts))])) return len(self.accounts) - def default_account_id(self): - visible_acc_ids = [acc_id for acc_id in self.accounts.keys() - if self.show_account(acc_id)] - return visible_acc_ids[0] - def show_account(self, account_id): return self.account_is_used(account_id) or account_id in self.labels