From 133c32d64a53a8ae38e0c8c8a10753e423127782 Mon Sep 17 00:00:00 2001 From: Meet Mangukiya Date: Sat, 26 Feb 2022 20:06:29 +0530 Subject: [PATCH] feat(ethers-providers): expose pending tx_hash with a getter (#968) --- ethers-providers/src/pending_transaction.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ethers-providers/src/pending_transaction.rs b/ethers-providers/src/pending_transaction.rs index 05298a25..0e1a8bef 100644 --- a/ethers-providers/src/pending_transaction.rs +++ b/ethers-providers/src/pending_transaction.rs @@ -85,6 +85,11 @@ impl<'a, P: JsonRpcClient> PendingTransaction<'a, P> { self.provider.clone() } + /// Returns the transaction hash of the pending transaction + pub fn tx_hash(&self) -> TxHash { + self.tx_hash + } + /// Sets the number of confirmations for the pending transaction to resolve /// to a receipt #[must_use]