Skip to content

Commit

Permalink
Add tx.type check to _handleTxPricing
Browse files Browse the repository at this point in the history
  • Loading branch information
spacesailor24 committed Aug 27, 2021
1 parent 8e8785e commit 8915093
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/web3-core-method/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,10 @@ function _handleTxPricing(method, tx) {
getGasPrice()
]).then(responses => {
const [block, gasPrice] = responses;
if (block && block.baseFeePerGas) {
if (
(tx.type === '0x2' || tx.type === undefined) &&
(block && block.baseFeePerGas)
) {
// The network supports EIP-1559

// Taken from https://github.com/ethers-io/ethers.js/blob/ba6854bdd5a912fe873d5da494cb5c62c190adde/packages/abstract-provider/src.ts/index.ts#L230
Expand Down

0 comments on commit 8915093

Please sign in to comment.