mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: rename reth_primitives::RecoveredTx functions to match alloy::Recovered (#13663)
This commit is contained in:
@ -1546,17 +1546,17 @@ impl<T> RecoveredTx<T> {
|
||||
}
|
||||
|
||||
/// Returns a reference to [`TransactionSigned`]
|
||||
pub const fn as_signed(&self) -> &T {
|
||||
pub const fn tx(&self) -> &T {
|
||||
&self.signed_transaction
|
||||
}
|
||||
|
||||
/// Transform back to [`TransactionSigned`]
|
||||
pub fn into_signed(self) -> T {
|
||||
pub fn into_tx(self) -> T {
|
||||
self.signed_transaction
|
||||
}
|
||||
|
||||
/// Dissolve Self to its component
|
||||
pub fn to_components(self) -> (T, Address) {
|
||||
pub fn into_parts(self) -> (T, Address) {
|
||||
(self.signed_transaction, self.signer)
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ pub type PooledTransactionsElementEcRecovered<T = PooledTransaction> = Recovered
|
||||
impl PooledTransactionsElementEcRecovered {
|
||||
/// Transform back to [`RecoveredTx`]
|
||||
pub fn into_ecrecovered_transaction(self) -> RecoveredTx<TransactionSigned> {
|
||||
let (tx, signer) = self.to_components();
|
||||
let (tx, signer) = self.into_parts();
|
||||
RecoveredTx::from_signed_transaction(tx.into(), signer)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user