From e991722d9cb81dea5568c9cdf4a4e94c44df9fff Mon Sep 17 00:00:00 2001 From: Jochen Hoenicke Date: Fri, 4 Aug 2017 10:56:06 +0200 Subject: [PATCH] TREZOR: Remove sighash from input signatures TREZOR firmware expects signatures not to contain the trailing sighash byte. This fixes issue fyookball/electrum#47 which also applies to electrum. --- plugins/trezor/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/trezor/plugin.py b/plugins/trezor/plugin.py index ac9eb40f..edfe318e 100644 --- a/plugins/trezor/plugin.py +++ b/plugins/trezor/plugin.py @@ -281,7 +281,7 @@ class TrezorCompatiblePlugin(HW_PluginBase): pubkeys = map(f, x_pubkeys) multisig = self.types.MultisigRedeemScriptType( pubkeys=pubkeys, - signatures=map(lambda x: x.decode('hex') if x else '', txin.get('signatures')), + signatures=map(lambda x: x.decode('hex')[:-1] if x else '', txin.get('signatures')), m=txin.get('num_sig'), ) txinputtype = self.types.TxInputType(