Skip to content

Commit

Permalink
chore(rpc): don't recover sender if we have it (paradigmxyz#11645)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshieDo authored Oct 10, 2024
1 parent d027b7b commit 1d2c6d5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions crates/rpc/rpc-eth-api/src/helpers/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,9 @@ pub trait EthTransactions: LoadTransaction {
let gas_limit = estimated_gas;
request.set_gas_limit(gas_limit.to());

let signed_tx = self.sign_request(&from, request).await?;
let transaction = self.sign_request(&from, request).await?.with_signer(from);

let recovered =
signed_tx.into_ecrecovered().ok_or(EthApiError::InvalidTransactionSignature)?;

let pool_transaction = <<Self as LoadTransaction>::Pool as TransactionPool>::Transaction::try_from_consensus(recovered.into()).map_err(|_| EthApiError::TransactionConversionError)?;
let pool_transaction = <<Self as LoadTransaction>::Pool as TransactionPool>::Transaction::try_from_consensus(transaction.into()).map_err(|_| EthApiError::TransactionConversionError)?;

// submit the transaction to the pool with a `Local` origin
let hash = LoadTransaction::pool(self)
Expand Down

0 comments on commit 1d2c6d5

Please sign in to comment.