mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 01:35:20 +00:00
separate load_wallet hook for installwizard
This commit is contained in:
parent
16344b43af
commit
5ffd26402e
3 changed files with 10 additions and 1 deletions
|
@ -347,7 +347,7 @@ class InstallWizard(QDialog):
|
||||||
password = None
|
password = None
|
||||||
|
|
||||||
# load wallet in plugins
|
# load wallet in plugins
|
||||||
run_hook('load_wallet', wallet, self)
|
always_hook('installwizard_load_wallet', wallet, self)
|
||||||
|
|
||||||
while action is not None:
|
while action is not None:
|
||||||
util.print_error("installwizard:", wallet, action)
|
util.print_error("installwizard:", wallet, action)
|
||||||
|
|
|
@ -117,6 +117,10 @@ class Plugin(BasePlugin):
|
||||||
QMessageBox.information(self.window, _('Error'), _("Trezor device not detected.\nContinuing in watching-only mode."), _('OK'))
|
QMessageBox.information(self.window, _('Error'), _("Trezor device not detected.\nContinuing in watching-only mode."), _('OK'))
|
||||||
self.wallet.force_watching_only = True
|
self.wallet.force_watching_only = True
|
||||||
|
|
||||||
|
@hook
|
||||||
|
def installwizard_load_wallet(self, wallet, window):
|
||||||
|
self.load_wallet(wallet, window)
|
||||||
|
|
||||||
@hook
|
@hook
|
||||||
def installwizard_restore(self, wizard, storage):
|
def installwizard_restore(self, wizard, storage):
|
||||||
if storage.get('wallet_type') != 'trezor':
|
if storage.get('wallet_type') != 'trezor':
|
||||||
|
|
|
@ -333,6 +333,11 @@ class Plugin(BasePlugin):
|
||||||
t.setDaemon(True)
|
t.setDaemon(True)
|
||||||
t.start()
|
t.start()
|
||||||
|
|
||||||
|
@hook
|
||||||
|
def installwizard_load_wallet(self, wallet, window):
|
||||||
|
self.wallet = wallet
|
||||||
|
self.window = window
|
||||||
|
|
||||||
@hook
|
@hook
|
||||||
def close_wallet(self):
|
def close_wallet(self):
|
||||||
self.window.statusBar().removeWidget(self.trustedcoin_button)
|
self.window.statusBar().removeWidget(self.trustedcoin_button)
|
||||||
|
|
Loading…
Add table
Reference in a new issue