This works for ordinary wallets at least; cannot test hardware.
But after staring for ages I think it's right.
This commit is contained in:
Neil Booth 2015-09-02 21:27:12 +09:00
parent f2fb856f1c
commit 7a55d02654
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ def init_plugins(config, is_local, gui_name):
def register_wallet_type(name, x):
import wallet
x += (lambda: plugin_loader(config, name),)
x += (lambda storage: plugin_loader(config, name).constructor(storage),)
wallet.wallet_types.append(x)
descriptions = electrum_plugins.descriptions

View File

@ -1927,7 +1927,7 @@ class Wallet(object):
if wallet_type:
for cat, t, name, loader in wallet_types:
if t == wallet_type:
WalletClass = lambda storage: apply(loader().constructor, (storage,))
WalletClass = loader
break
else:
if re.match('(\d+)of(\d+)', wallet_type):