Skip to content

Commit

Permalink
style: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
gpBlockchain committed Feb 18, 2024
1 parent 1e8d3ed commit d21a45b
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/utils/other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,17 @@ pub fn get_live_cell(

match transaction.tx_status.status {
Status::Pending | Status::Proposed => {
let tx = transaction
.transaction
.ok_or("Transaction not found")?;

let tx = transaction.transaction.ok_or("Transaction not found")?;
let id: usize = out_point.clone().index().unpack();
let output = tx.inner.outputs.get(id)
let output = tx
.inner
.outputs
.get(id)
.cloned()
.ok_or("Output not found")?;

Ok((output.into(), Bytes::new()))
}
Status::Committed => {
get_live_cell_internal(client, out_point, with_data)
}
Status::Committed => get_live_cell_internal(client, out_point, with_data),
Status::Unknown | Status::Rejected => {
Err(format!("Transaction status is unknown or rejected"))
}
Expand Down

0 comments on commit d21a45b

Please sign in to comment.