1
0

use separata class for old wallets; decide with WalletFactory

This commit is contained in:
ThomasV
2014-02-03 06:26:03 +01:00
parent df4b47849d
commit 70bace9b1e
4 changed files with 185 additions and 151 deletions

View File

@@ -258,13 +258,13 @@ class InstallWizard(QDialog):
if not action:
return
wallet = Wallet(self.storage)
gap = self.config.get('gap_limit', 5)
if gap != 5:
wallet.gap_limit = gap
wallet.storage.put('gap_limit', gap, True)
#gap = self.config.get('gap_limit', 5)
#if gap != 5:
# wallet.gap_limit = gap
# wallet.storage.put('gap_limit', gap, True)
if action == 'create':
wallet = Wallet(self.storage)
wallet.init_seed(None)
if not self.show_seed(wallet):
return
@@ -276,23 +276,14 @@ class InstallWizard(QDialog):
wallet.synchronize() # generate first addresses offline
self.waiting_dialog(create)
elif action == 'restore':
seed = self.seed_dialog()
if not seed:
return
try:
wallet.init_seed(seed)
except Exception:
import traceback
traceback.print_exc(file=sys.stdout)
QMessageBox.warning(None, _('Error'), _('Incorrect seed'), _('OK'))
return
wallet = Wallet.from_seed(seed, self.storage)
ok, old_password, password = self.password_dialog(wallet)
wallet.save_seed(password)
elif action == 'watching':
mpk = self.mpk_dialog()
if not mpk: