separate add_seed from create_master_keys
This commit is contained in:
parent
2c51b0aa14
commit
c7f667e2ed
2
electrum
2
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)
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue