Use `into` for hash argument
Hash types can be converted into a `Message` because `Message` implements `From` for any type that implements `ThirtyTwoByteHash`, which hash types do. Use `into` to convert the hash argument to a message to sign.
This commit is contained in:
parent
5a867821aa
commit
324b6f264b
|
@ -745,7 +745,7 @@ fn sign_psbt_taproot(
|
|||
Some(_) => keypair, // no tweak for script spend
|
||||
};
|
||||
|
||||
let sig = secp.sign_schnorr(&Message::from_slice(&hash.into_inner()[..]).unwrap(), &keypair);
|
||||
let sig = secp.sign_schnorr(&hash.into(), &keypair);
|
||||
|
||||
let final_signature = taproot::Signature { sig, hash_ty };
|
||||
|
||||
|
|
Loading…
Reference in New Issue