mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
fix: load trustedcoin plugin for two-step wallet creation
This commit is contained in:
parent
d74f0c0947
commit
3631c27ed7
4 changed files with 11 additions and 6 deletions
|
@ -566,6 +566,7 @@ class BaseWizard(object):
|
|||
for key, value in self.data.items():
|
||||
storage.put(key, value)
|
||||
storage.write()
|
||||
storage.load_plugins()
|
||||
return storage
|
||||
|
||||
def show_xpub_and_add_cosigners(self, xpub):
|
||||
|
|
|
@ -317,7 +317,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
|||
self.show_warning(_('The file was removed'))
|
||||
return
|
||||
self.show()
|
||||
self.data = storage.data
|
||||
self.data = storage.db.data # FIXME
|
||||
self.run(action)
|
||||
for k, v in self.data.items():
|
||||
storage.put(k, v)
|
||||
|
|
|
@ -31,7 +31,7 @@ import zlib
|
|||
|
||||
from . import ecc
|
||||
from .util import PrintError, profiler, InvalidPassword, WalletFileException, bfh, standardize_path
|
||||
from .plugin import run_hook
|
||||
from .plugin import run_hook, plugin_loaders
|
||||
|
||||
from .json_db import JsonDB
|
||||
|
||||
|
@ -68,6 +68,13 @@ class WalletStorage(PrintError):
|
|||
# avoid new wallets getting 'upgraded'
|
||||
self.db = DB_Class('', manual_upgrades=False)
|
||||
|
||||
self.load_plugins()
|
||||
|
||||
def load_plugins(self):
|
||||
wallet_type = self.db.get('wallet_type')
|
||||
if wallet_type in plugin_loaders:
|
||||
plugin_loaders[wallet_type]()
|
||||
|
||||
def put(self, key,value):
|
||||
self.db.put(key, value)
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ from .util import multisig_type
|
|||
from .storage import STO_EV_PLAINTEXT, STO_EV_USER_PW, STO_EV_XPUB_PW, WalletStorage
|
||||
from . import transaction, bitcoin, coinchooser, paymentrequest, ecc, bip32
|
||||
from .transaction import Transaction, TxOutput, TxOutputHwInfo
|
||||
from .plugin import run_hook, plugin_loaders
|
||||
from .plugin import run_hook
|
||||
from .address_synchronizer import (AddressSynchronizer, TX_HEIGHT_LOCAL,
|
||||
TX_HEIGHT_UNCONF_PARENT, TX_HEIGHT_UNCONFIRMED)
|
||||
from .paymentrequest import (PR_PAID, PR_UNPAID, PR_UNKNOWN, PR_EXPIRED,
|
||||
|
@ -1829,9 +1829,6 @@ class Wallet(object):
|
|||
|
||||
def __new__(self, storage):
|
||||
wallet_type = storage.get('wallet_type')
|
||||
# check here if I need to load a plugin
|
||||
if wallet_type in plugin_loaders:
|
||||
plugin_loaders[wallet_type]()
|
||||
WalletClass = Wallet.wallet_class(wallet_type)
|
||||
wallet = WalletClass(storage)
|
||||
# Convert hardware wallets restored with older versions of
|
||||
|
|
Loading…
Add table
Reference in a new issue