From ea735428dd5f0d7f9fd741892fbe5658e16385e0 Mon Sep 17 00:00:00 2001 From: alessandrokonrad Date: Mon, 19 Sep 2022 13:48:05 +0200 Subject: [PATCH] fixed typos --- crates/uplc/src/tx/error.rs | 4 ++-- crates/uplc/src/tx/eval.rs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/uplc/src/tx/error.rs b/crates/uplc/src/tx/error.rs index 0c09fa1c..fe563144 100644 --- a/crates/uplc/src/tx/error.rs +++ b/crates/uplc/src/tx/error.rs @@ -21,8 +21,8 @@ pub enum Error { missing: Vec, extra: Vec, }, - #[error("Extranous redeemer found: Tag {:?}, Index {}", tag, index)] - ExtranousRedeemer { tag: String, index: u32 }, + #[error("Extraneous redeemer found: Tag {:?}, Index {}", tag, index)] + ExtraneousRedeemer { tag: String, index: u32 }, #[error("Resolved Input not found")] ResolvedInputNotFound, #[error("A key hash cannot be the hash of a script")] diff --git a/crates/uplc/src/tx/eval.rs b/crates/uplc/src/tx/eval.rs index 8439038f..63ebffd8 100644 --- a/crates/uplc/src/tx/eval.rs +++ b/crates/uplc/src/tx/eval.rs @@ -71,7 +71,7 @@ pub fn get_tx_in_info_v1( .iter() .map(|input| { let utxo = match utxos.iter().find(|utxo| utxo.input == *input) { - Some(u) => u, + Some(resolved) => resolved, None => return Err(Error::ResolvedInputNotFound), }; let address = Address::from_bytes(match &utxo.output { @@ -119,7 +119,7 @@ fn get_tx_in_info_v2( .iter() .map(|input| { let utxo = match utxos.iter().find(|utxo| utxo.input == *input) { - Some(u) => u, + Some(resolved) => resolved, None => return Err(Error::ResolvedInputNotFound), }; let address = Address::from_bytes(match &utxo.output { @@ -169,7 +169,7 @@ fn get_script_purpose( match policy_ids.get(index as usize) { Some(policy_id) => Ok(ScriptPurpose::Minting(*policy_id)), None => { - return Err(Error::ExtranousRedeemer { + return Err(Error::ExtraneousRedeemer { tag: "Mint".to_string(), index, }) @@ -183,7 +183,7 @@ fn get_script_purpose( match inputs.get(index as usize) { Some(input) => Ok(ScriptPurpose::Spending(input.clone())), None => { - return Err(Error::ExtranousRedeemer { + return Err(Error::ExtraneousRedeemer { tag: "Spend".to_string(), index, }) @@ -202,7 +202,7 @@ fn get_script_purpose( let reward_account = match reward_accounts.get(index as usize) { Some(ra) => ra.clone(), None => { - return Err(Error::ExtranousRedeemer { + return Err(Error::ExtraneousRedeemer { tag: "Reward".to_string(), index, }) @@ -229,7 +229,7 @@ fn get_script_purpose( { Some(cert) => Ok(ScriptPurpose::Certifying(cert.clone())), None => { - return Err(Error::ExtranousRedeemer { + return Err(Error::ExtraneousRedeemer { tag: "Cert".to_string(), index, })