File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -473,7 +473,13 @@ impl<Pk: MiniscriptKey + ToPublicKey> Placeholder<Pk> {
473473 /// Replaces the placeholders with the information given by the satisfier
474474 pub fn satisfy_self < Sat : Satisfier < Pk > > ( & self , sat : & Sat ) -> Option < Vec < u8 > > {
475475 match self {
476- Placeholder :: Pubkey ( pk, _) => Some ( pk. to_public_key ( ) . to_bytes ( ) ) ,
476+ Placeholder :: Pubkey ( pk, size) => {
477+ if * size==34 as usize {
478+ return Some ( pk. to_public_key ( ) . to_bytes ( ) ) ;
479+ } else {
480+ return Some ( pk. to_x_only_pubkey ( ) . serialize ( ) . to_vec ( ) )
481+ }
482+ } , //length = 32 for XOnly
477483 Placeholder :: Hash256Preimage ( h) => sat. lookup_hash256 ( h) . map ( |p| p. to_vec ( ) ) ,
478484 Placeholder :: Sha256Preimage ( h) => sat. lookup_sha256 ( h) . map ( |p| p. to_vec ( ) ) ,
479485 Placeholder :: Hash160Preimage ( h) => sat. lookup_hash160 ( h) . map ( |p| p. to_vec ( ) ) ,
You can’t perform that action at this time.
0 commit comments