SomberNight
4 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
4 changed files with
14 additions and
7 deletions
-
electrum/plugins/bitbox02/bitbox02.py
-
electrum/plugins/coldcard/coldcard.py
-
electrum/plugins/ledger/ledger.py
-
electrum/plugins/trezor/trezor.py
|
|
@ -25,6 +25,9 @@ import electrum.ecc as ecc |
|
|
|
from ..hw_wallet import HW_PluginBase, HardwareClientBase |
|
|
|
|
|
|
|
|
|
|
|
_logger = get_logger(__name__) |
|
|
|
|
|
|
|
|
|
|
|
try: |
|
|
|
from bitbox02 import bitbox02 |
|
|
|
from bitbox02 import util |
|
|
@ -36,13 +39,12 @@ try: |
|
|
|
FirmwareVersionOutdatedException, |
|
|
|
) |
|
|
|
requirements_ok = True |
|
|
|
except ImportError: |
|
|
|
except ImportError as e: |
|
|
|
if not (isinstance(e, ModuleNotFoundError) and e.name == 'bitbox02'): |
|
|
|
_logger.exception('error importing bitbox02 plugin deps') |
|
|
|
requirements_ok = False |
|
|
|
|
|
|
|
|
|
|
|
_logger = get_logger(__name__) |
|
|
|
|
|
|
|
|
|
|
|
class BitBox02Client(HardwareClientBase): |
|
|
|
# handler is a BitBox02_Handler, importing it would lead to a circular dependency |
|
|
|
def __init__(self, handler: Any, device: Device, config: SimpleConfig, *, plugin: HW_PluginBase): |
|
|
|
|
|
@ -49,7 +49,9 @@ try: |
|
|
|
except: |
|
|
|
return False |
|
|
|
|
|
|
|
except ImportError: |
|
|
|
except ImportError as e: |
|
|
|
if not (isinstance(e, ModuleNotFoundError) and e.name == 'ckcc'): |
|
|
|
_logger.exception('error importing coldcard plugin deps') |
|
|
|
requirements_ok = False |
|
|
|
|
|
|
|
COINKITE_VID = 0xd13e |
|
|
|
|
|
@ -35,7 +35,9 @@ try: |
|
|
|
from btchip.btchipException import BTChipException |
|
|
|
BTCHIP = True |
|
|
|
BTCHIP_DEBUG = False |
|
|
|
except ImportError: |
|
|
|
except ImportError as e: |
|
|
|
if not (isinstance(e, ModuleNotFoundError) and e.name == 'btchip'): |
|
|
|
_logger.exception('error importing ledger plugin deps') |
|
|
|
BTCHIP = False |
|
|
|
|
|
|
|
MSG_NEEDS_FW_UPDATE_GENERIC = _('Firmware version too old. Please update at') + \ |
|
|
|
|
|
@ -36,7 +36,8 @@ try: |
|
|
|
|
|
|
|
TREZORLIB = True |
|
|
|
except Exception as e: |
|
|
|
_logger.exception('error importing trezorlib') |
|
|
|
if not (isinstance(e, ModuleNotFoundError) and e.name == 'trezorlib'): |
|
|
|
_logger.exception('error importing trezor plugin deps') |
|
|
|
TREZORLIB = False |
|
|
|
|
|
|
|
class _EnumMissing: |
|
|
|