use separata class for old wallets; decide with WalletFactory
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user