feat(ethers-providers): expose pending tx_hash with a getter (#968)

This commit is contained in:
Meet Mangukiya 2022-02-26 20:06:29 +05:30 committed by GitHub
parent e7befcaaa0
commit 133c32d64a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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]