wizard: scan hardware devices directly

This commit is contained in:
ThomasV
2016-08-23 13:40:11 +02:00
parent 0520eda628
commit 4781df9d21
5 changed files with 61 additions and 43 deletions

View File

@@ -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