Skip to content

Commit

Permalink
minors
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraccaman committed Aug 8, 2024
1 parent 63576a9 commit 8c8ba11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tasks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,19 @@ pub trait Task {
}

fn get_tx_errors(tx: &Tx, tx_response: &ProcessTxResponse) -> Option<String> {
let _cmt = tx.first_commitments().unwrap().to_owned();
let _inner_tx_hash = tx.header_hash();
let cmt = tx.first_commitments().unwrap().to_owned();
let wrapper_hash = tx.wrapper_hash();
match tx_response {
ProcessTxResponse::Applied(result) => match &result.batch {
Some(batch) => {
match batch.get_inner_tx_result(wrapper_hash.as_ref(), either::Right(&_cmt)) {
match batch.get_inner_tx_result(wrapper_hash.as_ref(), either::Right(&cmt)) {
Some(Ok(res)) => {
let errors = res.vps_result.errors.clone();
let _status_flag = res.vps_result.status_flags;
let _rejected_vps = res.vps_result.rejected_vps.clone();
Some(serde_json::to_string(&errors).unwrap())
}
Some(Err(e)) => Some(e.to_string()),
_ => None,
}
}
Expand Down

0 comments on commit 8c8ba11

Please sign in to comment.