wizard: scan hardware devices directly
This commit is contained in:
@@ -139,19 +139,18 @@ class Plugins(DaemonThread):
|
||||
requires = d.get('requires_wallet_type', [])
|
||||
return not requires or w.wallet_type in requires
|
||||
|
||||
def hardware_wallets(self, action):
|
||||
wallet_types, descs = [], []
|
||||
def get_hardware_support(self):
|
||||
out = []
|
||||
for name, (gui_good, details) in self.hw_wallets.items():
|
||||
if gui_good:
|
||||
try:
|
||||
p = self.get_plugin(name)
|
||||
if action == 'restore' or p.is_enabled():
|
||||
wallet_types.append(details[1])
|
||||
descs.append(details[2])
|
||||
if p.is_enabled():
|
||||
out.append([name, details[2], p])
|
||||
except:
|
||||
traceback.print_exc()
|
||||
self.print_error("cannot load plugin for:", name)
|
||||
return wallet_types, descs
|
||||
return out
|
||||
|
||||
def register_wallet_type(self, name, gui_good, wallet_type):
|
||||
from wallet import register_wallet_type, register_constructor
|
||||
|
||||
Reference in New Issue
Block a user