mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 09:21:39 +00:00
qt wizard: select_storage
This commit is contained in:
parent
beb9f63274
commit
8f4967f7d0
2 changed files with 7 additions and 4 deletions
|
@ -226,10 +226,10 @@ class ElectrumGui(PrintError):
|
|||
else:
|
||||
return
|
||||
if not wallet:
|
||||
storage = WalletStorage(path, manual_upgrades=True)
|
||||
wizard = InstallWizard(self.config, self.app, self.plugins, storage)
|
||||
wizard = InstallWizard(self.config, self.app, self.plugins, None)
|
||||
try:
|
||||
wallet = wizard.run_and_get_wallet(self.daemon.get_wallet)
|
||||
if wizard.select_storage(path, self.daemon.get_wallet):
|
||||
wallet = wizard.run_and_get_wallet()
|
||||
except UserCancelled:
|
||||
pass
|
||||
except GoBack as e:
|
||||
|
|
|
@ -159,7 +159,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
|||
self.raise_()
|
||||
self.refresh_gui() # Need for QT on MacOSX. Lame.
|
||||
|
||||
def run_and_get_wallet(self, get_wallet_from_daemon):
|
||||
def select_storage(self, path, get_wallet_from_daemon):
|
||||
|
||||
vbox = QVBoxLayout()
|
||||
hbox = QHBoxLayout()
|
||||
|
@ -183,6 +183,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
|||
vbox.addLayout(hbox2)
|
||||
self.set_layout(vbox, title=_('Electrum wallet'))
|
||||
|
||||
self.storage = WalletStorage(path, manual_upgrades=True)
|
||||
wallet_folder = os.path.dirname(self.storage.path)
|
||||
|
||||
def on_choose():
|
||||
|
@ -284,7 +285,9 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
|||
return
|
||||
else:
|
||||
raise Exception('Unexpected encryption version')
|
||||
return True
|
||||
|
||||
def run_and_get_wallet(self):
|
||||
path = self.storage.path
|
||||
if self.storage.requires_split():
|
||||
self.hide()
|
||||
|
|
Loading…
Add table
Reference in a new issue