Skip to content

Commit

Permalink
Added status_tx_async function for check tx status against hash (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaoticTempest authored Jun 5, 2024
1 parent 02829da commit e8bf694
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 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.3.0"
version = "0.3.1"
edition = "2021"
license = "MIT OR Apache-2.0"
readme = "../README.md"
Expand Down
2 changes: 1 addition & 1 deletion near-fetch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ impl Client {
}

/// Fetches the status of a transaction given the transaction hash.
pub(crate) async fn tx_async_status(
pub async fn status_tx_async(
&self,
sender_id: &AccountId,
tx_hash: CryptoHash,
Expand Down
4 changes: 2 additions & 2 deletions near-fetch/src/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ impl AsyncTransactionStatus {
pub async fn status(&self) -> Result<Poll<ExecutionFinalResult>> {
let result = self
.client
.tx_async_status(&self.sender_id, self.hash, TxExecutionStatus::Included)
.status_tx_async(&self.sender_id, self.hash, TxExecutionStatus::Included)
.await
.map(ExecutionFinalResult::from_view);

Expand Down Expand Up @@ -589,7 +589,7 @@ impl AsyncTransactionStatus {
/// Waits until a sepcific transaction status is reached.
pub async fn wait_until(self, wait_until: TxExecutionStatus) -> Result<ExecutionFinalResult> {
self.client
.tx_async_status(&self.sender_id, self.hash, wait_until)
.status_tx_async(&self.sender_id, self.hash, wait_until)
.await
.map(ExecutionFinalResult::from_view)
}
Expand Down

0 comments on commit e8bf694

Please sign in to comment.