fixed typos
This commit is contained in:
parent
4a6496db3f
commit
ea735428dd
|
@ -21,8 +21,8 @@ pub enum Error {
|
||||||
missing: Vec<String>,
|
missing: Vec<String>,
|
||||||
extra: Vec<String>,
|
extra: Vec<String>,
|
||||||
},
|
},
|
||||||
#[error("Extranous redeemer found: Tag {:?}, Index {}", tag, index)]
|
#[error("Extraneous redeemer found: Tag {:?}, Index {}", tag, index)]
|
||||||
ExtranousRedeemer { tag: String, index: u32 },
|
ExtraneousRedeemer { tag: String, index: u32 },
|
||||||
#[error("Resolved Input not found")]
|
#[error("Resolved Input not found")]
|
||||||
ResolvedInputNotFound,
|
ResolvedInputNotFound,
|
||||||
#[error("A key hash cannot be the hash of a script")]
|
#[error("A key hash cannot be the hash of a script")]
|
||||||
|
|
|
@ -71,7 +71,7 @@ pub fn get_tx_in_info_v1(
|
||||||
.iter()
|
.iter()
|
||||||
.map(|input| {
|
.map(|input| {
|
||||||
let utxo = match utxos.iter().find(|utxo| utxo.input == *input) {
|
let utxo = match utxos.iter().find(|utxo| utxo.input == *input) {
|
||||||
Some(u) => u,
|
Some(resolved) => resolved,
|
||||||
None => return Err(Error::ResolvedInputNotFound),
|
None => return Err(Error::ResolvedInputNotFound),
|
||||||
};
|
};
|
||||||
let address = Address::from_bytes(match &utxo.output {
|
let address = Address::from_bytes(match &utxo.output {
|
||||||
|
@ -119,7 +119,7 @@ fn get_tx_in_info_v2(
|
||||||
.iter()
|
.iter()
|
||||||
.map(|input| {
|
.map(|input| {
|
||||||
let utxo = match utxos.iter().find(|utxo| utxo.input == *input) {
|
let utxo = match utxos.iter().find(|utxo| utxo.input == *input) {
|
||||||
Some(u) => u,
|
Some(resolved) => resolved,
|
||||||
None => return Err(Error::ResolvedInputNotFound),
|
None => return Err(Error::ResolvedInputNotFound),
|
||||||
};
|
};
|
||||||
let address = Address::from_bytes(match &utxo.output {
|
let address = Address::from_bytes(match &utxo.output {
|
||||||
|
@ -169,7 +169,7 @@ fn get_script_purpose(
|
||||||
match policy_ids.get(index as usize) {
|
match policy_ids.get(index as usize) {
|
||||||
Some(policy_id) => Ok(ScriptPurpose::Minting(*policy_id)),
|
Some(policy_id) => Ok(ScriptPurpose::Minting(*policy_id)),
|
||||||
None => {
|
None => {
|
||||||
return Err(Error::ExtranousRedeemer {
|
return Err(Error::ExtraneousRedeemer {
|
||||||
tag: "Mint".to_string(),
|
tag: "Mint".to_string(),
|
||||||
index,
|
index,
|
||||||
})
|
})
|
||||||
|
@ -183,7 +183,7 @@ fn get_script_purpose(
|
||||||
match inputs.get(index as usize) {
|
match inputs.get(index as usize) {
|
||||||
Some(input) => Ok(ScriptPurpose::Spending(input.clone())),
|
Some(input) => Ok(ScriptPurpose::Spending(input.clone())),
|
||||||
None => {
|
None => {
|
||||||
return Err(Error::ExtranousRedeemer {
|
return Err(Error::ExtraneousRedeemer {
|
||||||
tag: "Spend".to_string(),
|
tag: "Spend".to_string(),
|
||||||
index,
|
index,
|
||||||
})
|
})
|
||||||
|
@ -202,7 +202,7 @@ fn get_script_purpose(
|
||||||
let reward_account = match reward_accounts.get(index as usize) {
|
let reward_account = match reward_accounts.get(index as usize) {
|
||||||
Some(ra) => ra.clone(),
|
Some(ra) => ra.clone(),
|
||||||
None => {
|
None => {
|
||||||
return Err(Error::ExtranousRedeemer {
|
return Err(Error::ExtraneousRedeemer {
|
||||||
tag: "Reward".to_string(),
|
tag: "Reward".to_string(),
|
||||||
index,
|
index,
|
||||||
})
|
})
|
||||||
|
@ -229,7 +229,7 @@ fn get_script_purpose(
|
||||||
{
|
{
|
||||||
Some(cert) => Ok(ScriptPurpose::Certifying(cert.clone())),
|
Some(cert) => Ok(ScriptPurpose::Certifying(cert.clone())),
|
||||||
None => {
|
None => {
|
||||||
return Err(Error::ExtranousRedeemer {
|
return Err(Error::ExtraneousRedeemer {
|
||||||
tag: "Cert".to_string(),
|
tag: "Cert".to_string(),
|
||||||
index,
|
index,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue