Skip to content

Commit

Permalink
release: 0.5.1 (#25)
Browse files Browse the repository at this point in the history
* Added fix for transaction status not falling into unreachable code

* Bump to 0.5.1
  • Loading branch information
ChaoticTempest authored Sep 5, 2024
1 parent 3449411 commit d5dd602
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion near-fetch/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "near-fetch"
version = "0.5.0"
version = "0.5.1"
edition = "2021"
license = "MIT OR Apache-2.0"
readme = "../README.md"
Expand Down
2 changes: 2 additions & 0 deletions near-fetch/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ pub enum Error {
Rpc(Box<dyn std::error::Error + Send + Sync>),
#[error(transparent)]
TxExecution(Box<TxExecutionError>),
#[error("tx_status={0}")]
TxStatus(&'static str),

#[error(transparent)]
Serialization(#[from] serde_json::Error),
Expand Down
3 changes: 2 additions & 1 deletion near-fetch/src/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ impl ExecutionFinalResult {
details: self.details,
}),
FinalExecutionStatus::Failure(tx_error) => Err(Error::TxExecution(Box::new(tx_error))),
_ => unreachable!(),
FinalExecutionStatus::NotStarted => Err(Error::TxStatus("NotStarted")),
FinalExecutionStatus::Started => Err(Error::TxStatus("Started")),
}
}

Expand Down

0 comments on commit d5dd602

Please sign in to comment.