1
0

fix: add wallet types only if available

This commit is contained in:
ThomasV
2015-02-01 10:44:29 +01:00
parent 513b92f1a5
commit 395312e70f
4 changed files with 6 additions and 6 deletions

View File

@@ -45,9 +45,9 @@ class Plugin(BasePlugin):
def __init__(self, gui, name):
BasePlugin.__init__(self, gui, name)
self._is_available = self._init()
self.wallet = None
electrum.wallet.wallet_types.append(('hardware', 'btchip', _("BTChip wallet"), BTChipWallet))
self.wallet = None
if self._is_available:
electrum.wallet.wallet_types.append(('hardware', 'btchip', _("BTChip wallet"), BTChipWallet))
def _init(self):
return BTCHIP

View File

@@ -49,7 +49,8 @@ class Plugin(BasePlugin):
self._is_available = self._init()
self._requires_settings = True
self.wallet = None
electrum.wallet.wallet_types.append(('hardware', 'trezor', _("Trezor wallet"), TrezorWallet))
if self._is_available:
electrum.wallet.wallet_types.append(('hardware', 'trezor', _("Trezor wallet"), TrezorWallet))
def _init(self):
return TREZOR