HardwareClientBase: provide default implementation for label
and add warning about placeholders
This commit is contained in:
@@ -88,10 +88,6 @@ class DigitalBitbox_Client(HardwareClientBase):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def label(self):
|
|
||||||
return " "
|
|
||||||
|
|
||||||
|
|
||||||
def is_pairable(self):
|
def is_pairable(self):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
@@ -196,7 +196,9 @@ class HardwareClientBase:
|
|||||||
and they are also used as a fallback to distinguish devices programmatically.
|
and they are also used as a fallback to distinguish devices programmatically.
|
||||||
So ideally, different devices would have different labels.
|
So ideally, different devices would have different labels.
|
||||||
"""
|
"""
|
||||||
raise NotImplementedError()
|
# When returning a constant here (i.e. not implementing the method in the way
|
||||||
|
# it is supposed to work), make sure the return value is in electrum.plugin.PLACEHOLDER_HW_CLIENT_LABELS
|
||||||
|
return " "
|
||||||
|
|
||||||
def get_soft_device_id(self) -> Optional[str]:
|
def get_soft_device_id(self) -> Optional[str]:
|
||||||
"""An id-like string that is used to distinguish devices programmatically.
|
"""An id-like string that is used to distinguish devices programmatically.
|
||||||
|
|||||||
@@ -80,9 +80,6 @@ class Ledger_Client(HardwareClientBase):
|
|||||||
def is_initialized(self):
|
def is_initialized(self):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def label(self):
|
|
||||||
return ""
|
|
||||||
|
|
||||||
def get_soft_device_id(self):
|
def get_soft_device_id(self):
|
||||||
if self._soft_device_id is None:
|
if self._soft_device_id is None:
|
||||||
# modern ledger can provide xpub without user interaction
|
# modern ledger can provide xpub without user interaction
|
||||||
|
|||||||
Reference in New Issue
Block a user