1
0

make plugins available without the GUI

This commit is contained in:
ThomasV
2015-05-23 10:38:19 +02:00
parent 89c277de9d
commit 8f98ea4aca
15 changed files with 244 additions and 160 deletions

View File

@@ -35,18 +35,13 @@ except ImportError:
class Plugin(BasePlugin):
def fullname(self):
return 'BTChip Wallet'
def description(self):
return 'Provides support for BTChip hardware wallet\n\nRequires github.com/btchip/btchip-python'
def __init__(self, gui, name):
BasePlugin.__init__(self, gui, name)
self._is_available = self._init()
self.wallet = None
if self._is_available:
electrum.wallet.wallet_types.append(('hardware', 'btchip', _("BTChip wallet"), BTChipWallet))
def get_wallet_type(self):
return ('hardware', 'btchip', _("BTChip wallet"), BTChipWallet)
def _init(self):
return BTCHIP
@@ -70,9 +65,6 @@ class Plugin(BasePlugin):
return False
return True
def enable(self):
return BasePlugin.enable(self)
def btchip_is_connected(self):
try:
self.wallet.get_client().getFirmwareVersion()