|
@ -293,10 +293,15 @@ class Wallet: |
|
|
raise BaseException("a seed exists") |
|
|
raise BaseException("a seed exists") |
|
|
|
|
|
|
|
|
if not seed: |
|
|
if not seed: |
|
|
self.seed = self.make_seed() |
|
|
self.seed = random_seed(128) |
|
|
self.seed_version = SEED_VERSION |
|
|
self.seed_version = 4 |
|
|
return |
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
#if not seed: |
|
|
|
|
|
# self.seed = self.make_seed() |
|
|
|
|
|
# self.seed_version = SEED_VERSION |
|
|
|
|
|
# return |
|
|
|
|
|
|
|
|
# find out what kind of wallet we are |
|
|
# find out what kind of wallet we are |
|
|
try: |
|
|
try: |
|
|
seed.decode('hex') |
|
|
seed.decode('hex') |
|
@ -335,9 +340,12 @@ class Wallet: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def create_accounts(self): |
|
|
def create_accounts(self): |
|
|
# create default account |
|
|
if self.seed_version == 4: |
|
|
self.create_master_keys('1') |
|
|
self.create_old_account() |
|
|
self.create_account('1','Main account') |
|
|
else: |
|
|
|
|
|
# create default account |
|
|
|
|
|
self.create_master_keys('1') |
|
|
|
|
|
self.create_account('1','Main account') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def create_master_keys(self, account_type): |
|
|
def create_master_keys(self, account_type): |
|
@ -1546,10 +1554,7 @@ class Wallet: |
|
|
wait_for_network() |
|
|
wait_for_network() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if self.seed_version == 4: |
|
|
self.create_accounts() |
|
|
self.create_old_account() |
|
|
|
|
|
else: |
|
|
|
|
|
self.create_accounts() |
|
|
|
|
|
wait_for_wallet() |
|
|
wait_for_wallet() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|