Browse Source

wallet: call create_accounts in save_seed

283
ThomasV 11 years ago
parent
commit
588f8fd110
  1. 2
      electrum
  2. 1
      gui/android.py
  3. 1
      gui/gtk.py
  4. 2
      gui/qt/installwizard.py
  5. 8
      lib/wallet.py

2
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.")

1
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':

1
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()

2
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'):

8
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()

Loading…
Cancel
Save