hw bitbox02: show error if trying to sign_message on testnet
User was getting confusing traceback. Original discussion shows the device only supports messages for mainnet. see https://github.com/spesmilo/electrum/pull/6649#issuecomment-708634831
This commit is contained in:
@@ -577,6 +577,10 @@ class BitBox02_KeyStore(Hardware_KeyStore):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def sign_message(self, sequence, message, password, *, script_type=None):
|
def sign_message(self, sequence, message, password, *, script_type=None):
|
||||||
|
if constants.net.TESTNET:
|
||||||
|
raise UserFacingException(
|
||||||
|
_("The {} only supports message signing on mainnet.").format(self.device)
|
||||||
|
)
|
||||||
if password:
|
if password:
|
||||||
raise Exception("BitBox02 does not accept a password from the host")
|
raise Exception("BitBox02 does not accept a password from the host")
|
||||||
client = self.get_client()
|
client = self.get_client()
|
||||||
|
|||||||
Reference in New Issue
Block a user