commit c7f667e2edec8d18ac6d6b0f664d833704b61977
parent 2c51b0aa14564a0f3e40ffd9a68ec5fa4d26a978
Author: ThomasV <thomasv@gitorious>
Date: Fri, 29 Aug 2014 14:11:59 +0200
separate add_seed from create_master_keys
Diffstat:
4 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/electrum b/electrum
@@ -289,6 +289,7 @@ if __name__ == '__main__':
sys.exit("Error: Invalid seed")
wallet = Wallet.from_seed(seed, storage)
wallet.add_seed(seed, password)
+ wallet.create_master_keys(password)
wallet.create_main_account(password)
if not options.offline:
@@ -310,6 +311,7 @@ if __name__ == '__main__':
wallet = Wallet(storage)
seed = wallet.make_seed()
wallet.add_seed(seed, password)
+ wallet.create_master_keys(password)
wallet.create_main_account(password)
wallet.synchronize()
print_msg("Your wallet generation seed is:\n\"%s\"" % seed)
diff --git a/gui/gtk.py b/gui/gtk.py
@@ -1304,7 +1304,8 @@ class ElectrumGui():
r = change_password_dialog(False, None)
password = r[2] if r else None
wallet.add_seed(seed, password)
- wallet.create_accounts(password)
+ wallet.create_master_keys(password)
+ wallet.create_main_account(password)
wallet.synchronize() # generate first addresses offline
elif action == 'restore':
@@ -1314,7 +1315,8 @@ class ElectrumGui():
r = change_password_dialog(False, None)
password = r[2] if r else None
wallet.add_seed(seed, password)
- wallet.create_accounts(password)
+ wallet.create_master_keys(password)
+ wallet.create_main_account(password)
else:
exit()
diff --git a/gui/qt/installwizard.py b/gui/qt/installwizard.py
@@ -380,6 +380,7 @@ class InstallWizard(QDialog):
return
password = self.password_dialog()
wallet.add_seed(seed, password)
+ wallet.create_master_keys(password)
elif action == 'add_cosigner':
xpub1 = wallet.master_public_keys.get("x1/")
@@ -464,6 +465,7 @@ class InstallWizard(QDialog):
password = self.password_dialog()
wallet = Wallet.from_seed(text, self.storage)
wallet.add_seed(text, password)
+ wallet.create_master_keys(password)
wallet.create_main_account(password)
else:
raise BaseException('unknown wallet type')
@@ -486,6 +488,7 @@ class InstallWizard(QDialog):
if Wallet.is_seed(text1):
wallet.add_seed(text1, password)
+ wallet.create_master_keys(password)
else:
wallet.add_master_public_key("x1/", text1)
@@ -520,6 +523,7 @@ class InstallWizard(QDialog):
if Wallet.is_seed(text1):
wallet.add_seed(text1, password)
+ wallet.create_master_keys(password)
else:
wallet.add_master_public_key("x1/", text1)
diff --git a/lib/wallet.py b/lib/wallet.py
@@ -1071,7 +1071,6 @@ class Deterministic_Wallet(Abstract_Wallet):
self.storage.put('seed', self.seed, True)
self.storage.put('seed_version', self.seed_version, True)
self.storage.put('use_encryption', self.use_encryption,True)
- self.create_master_keys(password)
def get_seed(self, password):
return pw_decode(self.seed, password)