detect available hardware wallets before listing them in wizard
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user