plugin: device_model_name defaults to plugin name if not overridden.
This commit is contained in:
@@ -193,15 +193,18 @@ class HardwareClientBase:
|
|||||||
def device_manager(self) -> 'DeviceMgr':
|
def device_manager(self) -> 'DeviceMgr':
|
||||||
return self.plugin.device_manager()
|
return self.plugin.device_manager()
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
def is_pairable(self) -> bool:
|
def is_pairable(self) -> bool:
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
def close(self):
|
def close(self):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
def timeout(self, cutoff) -> None:
|
def timeout(self, cutoff) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
def is_initialized(self) -> bool:
|
def is_initialized(self) -> bool:
|
||||||
"""True if initialized, False if wiped."""
|
"""True if initialized, False if wiped."""
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
@@ -253,8 +256,9 @@ class HardwareClientBase:
|
|||||||
def device_model_name(self) -> Optional[str]:
|
def device_model_name(self) -> Optional[str]:
|
||||||
"""Return the name of the model of this device, which might be displayed in the UI.
|
"""Return the name of the model of this device, which might be displayed in the UI.
|
||||||
E.g. for Trezor, "Trezor One" or "Trezor T".
|
E.g. for Trezor, "Trezor One" or "Trezor T".
|
||||||
|
If this method is not defined for a plugin, the plugin name is used as default
|
||||||
"""
|
"""
|
||||||
return None
|
return self.plugin.name
|
||||||
|
|
||||||
def manipulate_keystore_dict_during_wizard_setup(self, d: dict) -> None:
|
def manipulate_keystore_dict_during_wizard_setup(self, d: dict) -> None:
|
||||||
"""Called during wallet creation in the wizard, before the keystore
|
"""Called during wallet creation in the wizard, before the keystore
|
||||||
|
|||||||
Reference in New Issue
Block a user