Merge #361: add is_witness check before is_p2sh for non-witness utxos

a78f8d68f6 add not is_wit check to trezor (Kevin Mulcrone)

Pull request description:

  Fixes #360

  Correctly assigns the script type of an input when an input has a witnessScript but no witnessUtxo.

ACKs for top commit:
  achow101:
    ACK a78f8d68f6

Tree-SHA512: 4fbb61f327e8feb94ff69f09a094c8b9427168ac13ae311859a15074a351b7a4b5bd8d65d723d64f60232ad407e31cc24f6ac427c48f25745ad714f76a04685b
This commit is contained in:
Andrew Chow 2020-07-31 14:40:06 -04:00
commit 4be273bf45
No known key found for this signature in database
GPG Key ID: 17565732E08E5E41

View File

@ -257,7 +257,7 @@ class TrezorClient(HardwareWalletClient):
if is_ms:
# Add to txinputtype
txinputtype.multisig = multisig
if not psbt_in.witness_utxo:
if not is_wit:
if utxo.is_p2sh:
txinputtype.script_type = proto.InputScriptType.SPENDMULTISIG
else: