1
0

detect available hardware wallets before listing them in wizard

This commit is contained in:
ThomasV
2015-08-22 08:56:04 +02:00
committed by ThomasV
parent 280b5c79d2
commit 992c70a688
3 changed files with 24 additions and 17 deletions

View File

@@ -442,7 +442,17 @@ class InstallWizard(QDialog):
if not wallet_type:
return
elif wallet_type == 'hardware':
hardware_wallets = map(lambda x:(x[1],x[2]), filter(lambda x:x[0]=='hardware', electrum.wallet.wallet_types))
hardware_wallets = []
for item in electrum.wallet.wallet_types:
t, name, description, loader = item
if t == 'hardware':
try:
p = loader()
except:
util.print_error("cannot load plugin for:", name)
continue
if p:
hardware_wallets.append((name, description))
wallet_type = self.choice(_("Hardware Wallet"), 'Select your hardware wallet', hardware_wallets)
if not wallet_type: