File tree 1 file changed +7
-1
lines changed
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> {
473
473
/// Replaces the placeholders with the information given by the satisfier
474
474
pub fn satisfy_self < Sat : Satisfier < Pk > > ( & self , sat : & Sat ) -> Option < Vec < u8 > > {
475
475
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
477
483
Placeholder :: Hash256Preimage ( h) => sat. lookup_hash256 ( h) . map ( |p| p. to_vec ( ) ) ,
478
484
Placeholder :: Sha256Preimage ( h) => sat. lookup_sha256 ( h) . map ( |p| p. to_vec ( ) ) ,
479
485
Placeholder :: Hash160Preimage ( h) => sat. lookup_hash160 ( h) . map ( |p| p. to_vec ( ) ) ,
You can’t perform that action at this time.
0 commit comments