Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrokonrad committed Jan 20, 2025
1 parent 64e5b64 commit ec6a06f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Binary file modified src/core/libs/lucid_core/pkg/lucid_core_bg.wasm
Binary file not shown.
14 changes: 6 additions & 8 deletions src/core/libs/lucid_core/src/instruction_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,9 @@ impl InstructionBuilder {
}
Instruction::ReadFrom { utxos } => {
for utxo in utxos {
match (&utxo.datum_hash, &utxo.datum) {
(Some(_), Some(data)) => self.add_data(data)?,
_ => (),
};
if let (Some(_), Some(data)) = (&utxo.datum_hash, &utxo.datum) {
self.add_data(data)?;
}
match &utxo.script_ref {
Some(script) => {
self.add_language_or_keys(script)?;
Expand Down Expand Up @@ -596,10 +595,9 @@ impl InstructionBuilder {
}

fn add_input(&mut self, utxo: Utxo, redeemer: Option<String>) -> CoreResult<()> {
match (&utxo.datum_hash, &utxo.datum) {
(Some(_), Some(data)) => self.add_data(data)?,
_ => (),
};
if let (Some(_), Some(data)) = (&utxo.datum_hash, &utxo.datum) {
self.add_data(data)?;
}
match &utxo.script_ref {
Some(script) => {
self.add_language_or_keys(script)?;
Expand Down

0 comments on commit ec6a06f

Please sign in to comment.