Skip to content

Commit

Permalink
change option
Browse files Browse the repository at this point in the history
  • Loading branch information
atacann committed Feb 8, 2025
1 parent 7a02daf commit a663b79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/src/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,9 @@ impl Actor {
}
}
Kind::TimelockScript(script) => match (sig, script.0) {
(Some(sig), Some(_)) => script.generate_script_inputs(&Some(sig)),
(Some(sig), Some(_)) => script.generate_script_inputs(Some(&sig)),
(None, Some(xonly_key)) if xonly_key == self.xonly_public_key => {
script.generate_script_inputs(&Some(self.sign(calc_sighash()?)))
script.generate_script_inputs(Some(&self.sign(calc_sighash()?)))
}
(None, Some(_)) => return Err(BridgeError::SignatureNotFound),
(_, None) => Witness::new(),
Expand Down
2 changes: 1 addition & 1 deletion core/src/builder/script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ impl SpendableScript for TimelockScript {
}

impl TimelockScript {
pub fn generate_script_inputs(&self, signature: &Option<schnorr::Signature>) -> Witness {
pub fn generate_script_inputs(&self, signature: Option<&schnorr::Signature>) -> Witness {
match signature {
Some(sig) => Witness::from_slice(&[sig.serialize()]),
None => Witness::default(),
Expand Down

0 comments on commit a663b79

Please sign in to comment.