Skip to content

Commit

Permalink
fix opret support in construct_psbt()
Browse files Browse the repository at this point in the history
  • Loading branch information
nicbus authored and dr-orlovsky committed Feb 13, 2024
1 parent 9076e4a commit 8b03cc9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/pay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,10 @@ impl Runtime {
} else {
None
};
let output = psbt
.outputs_mut()
psbt.outputs_mut()
.find(|o| o.script.is_p2tr() && Some(&o.script) != beneficiary_script.as_ref())
.ok_or(CompositionError::TapretRequired)?;
.map(|o| o.set_tapret_host().expect("just created"));
// TODO: Add descriptor id to the tapret host data
output.set_tapret_host().expect("just created");

let change_script = meta
.change_vout
Expand Down

0 comments on commit 8b03cc9

Please sign in to comment.