From be1a21d97485e8945774c15c5e71bef8696b7b49 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Wed, 10 Sep 2014 10:33:49 +0200 Subject: [PATCH] call add_address in get_next_account --- lib/wallet.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/wallet.py b/lib/wallet.py index bf2ab009c..572bdb21f 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -1373,6 +1373,7 @@ class BIP32_HD_Wallet(BIP32_Wallet): self.add_master_private_key(derivation, xprv, password) account = BIP32_Account({'xpub':xpub}) addr = account.first_address() + self.add_address(addr) return account_id, xpub, addr def create_main_account(self, password): @@ -1397,18 +1398,12 @@ class BIP32_HD_Wallet(BIP32_Wallet): assert type(self.accounts.get(k)) == PendingAccount self.accounts.pop(k) self.save_accounts() - # prepare the next account - self.next_account = self.get_next_account(password) - self.storage.put('next_account', self.next_account) def create_pending_account(self, name, password): next_id, next_xpub, next_address = self.next_account if self.next_account else self.get_next_account_address(password) self.set_label(next_id, name) self.accounts[next_id] = PendingAccount({'pending':next_address}) self.save_accounts() - # prepare the next account - self.next_account = self.get_next_account(password) - self.storage.put('next_account', self.next_account) def synchronize(self): # synchronize existing accounts