1
0

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:
SomberNight
2022-12-19 07:49:40 +00:00
parent a383f56909
commit 8878059b2f

View File

@@ -577,6 +577,10 @@ class BitBox02_KeyStore(Hardware_KeyStore):
)
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:
raise Exception("BitBox02 does not accept a password from the host")
client = self.get_client()