Skip to content

Commit

Permalink
Merge pull request #130 from RGB-WG/opret_fix
Browse files Browse the repository at this point in the history
Fix opret support in construct_psbt()
  • Loading branch information
dr-orlovsky authored Feb 13, 2024
2 parents 9076e4a + 8b03cc9 commit a773b7d
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 a773b7d

Please sign in to comment.