commit 588f8fd1101f016637af82306f05535ecf2e4117
parent ee141f6d37329ad0c68d419598acb710dc3403cf
Author: ThomasV <thomasv@gitorious>
Date: Mon, 11 Nov 2013 17:41:46 +0100
wallet: call create_accounts in save_seed
Diffstat:
5 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/electrum b/electrum
@@ -236,14 +236,12 @@ if __name__ == '__main__':
else:
print_msg("Warning: Found no history for this wallet")
else:
- wallet.create_accounts()
wallet.synchronize()
print_msg("Warning: This wallet was restored offline. It may contain more addresses than displayed.")
else:
wallet.init_seed(None)
wallet.save_seed()
- wallet.create_accounts()
wallet.synchronize()
print_msg("Your wallet generation seed is:\n\"%s\""% wallet.get_mnemonic(None))
print_msg("Please keep it in a safe place; if you lose it, you will not be able to restore your wallet.")
diff --git a/gui/android.py b/gui/android.py
@@ -904,7 +904,6 @@ class ElectrumGui:
wallet.init_seed(None)
self.show_seed()
wallet.save_seed()
- wallet.create_accounts()
wallet.synchronize() # generate first addresses offline
elif action == 'restore':
diff --git a/gui/gtk.py b/gui/gtk.py
@@ -1313,7 +1313,6 @@ class ElectrumGui():
if action == 'create':
wallet.init_seed(None)
wallet.save_seed()
- wallet.create_accounts()
wallet.synchronize() # generate first addresses offline
elif action == 'restore':
seed = self.seed_dialog()
diff --git a/gui/qt/installwizard.py b/gui/qt/installwizard.py
@@ -271,7 +271,6 @@ class InstallWizard(QDialog):
if self.verify_seed(wallet):
def create():
wallet.save_seed()
- wallet.create_accounts()
wallet.synchronize() # generate first addresses offline
self.waiting_dialog(create)
else:
@@ -300,7 +299,6 @@ class InstallWizard(QDialog):
wallet.seed = ''
wallet.create_watching_only_wallet(mpk)
-
else: raise
#if not self.config.get('server'):
diff --git a/lib/wallet.py b/lib/wallet.py
@@ -310,7 +310,7 @@ class Wallet:
# find out what kind of wallet we are
try:
- seed.decode('hex')
+ seed.strip().decode('hex')
self.seed_version = 4
self.seed = str(seed)
return
@@ -339,6 +339,8 @@ class Wallet:
def save_seed(self):
self.storage.put('seed', self.seed, True)
self.storage.put('seed_version', self.seed_version, True)
+ self.create_accounts()
+
def create_watching_only_wallet(self, params):
K0, c0 = params
@@ -1608,10 +1610,6 @@ class Wallet:
# wait until we are connected, because the user might have selected another server
if self.network:
wait_for_network()
-
- self.create_accounts()
-
- if self.network:
wait_for_wallet()
else:
self.synchronize()