Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix tests
  • Loading branch information
GregTheGreek committed Jun 3, 2021
commit 53d2bb01861fe6cd5b645fd7498801d266fe0db8
11 changes: 9 additions & 2 deletions packages/web3-eth-accounts/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,17 @@ function _validateTransactionForSigning(tx) {

/* jshint ignore:start */
Accounts.prototype.recoverTransaction = function recoverTransaction(rawTx, txOptions = {}) {
// Determine if the transaction is typed or not
var {values, isTyped} = decodeUnknownTxType(rawTx);
// This is very hacky but an interim solution until we remove eth-lib
// Only thing stopping us from removing eth-lib is the new ethereumjs/tx setup requires txOpts
// That makes things a bit tricky for users.
// ----
// The following removes EIP-2930 related tx information from the rlp decoded tx.
if (isTyped) {
delete values[0]; // tx type
delete values[6]; //
// EIP-2930
values.shift() // remove chainId
delete values.splice(6,1); // remove accessList
}
var signature = Account.encodeSignature(values.slice(6, 9));
var recovery = Bytes.toNumber(values[6]);
Expand Down
Loading