From ecb7659c8941dd58682de733a00aadda8b3fb7be Mon Sep 17 00:00:00 2001 From: Meet Mangukiya Date: Sat, 26 Feb 2022 13:39:33 +0530 Subject: [PATCH] feat(ethers-providers): expose pending tx_hash with a getter --- 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 05298a258..0e1a8bef3 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]