diff --git a/packages/web3-providers/src/Web3/EVM/translators/Base.ts b/packages/web3-providers/src/Web3/EVM/translators/Base.ts index cef11817e2ea..6e1efa80cd55 100644 --- a/packages/web3-providers/src/Web3/EVM/translators/Base.ts +++ b/packages/web3-providers/src/Web3/EVM/translators/Base.ts @@ -33,7 +33,10 @@ export abstract class BaseTranslator implements Translator { }) const { [GasOptionType.SLOW]: slowOption, [GasOptionType.NORMAL]: normalOption } = options ?? {} - if (EVMChainResolver.isFeatureSupported(context.chainId, 'EIP1559')) { + // TODO: this field seems like not documented anywhere. should we just stop changing gasPrice? + const legacyTransactionUsed = config.type === '0x0' + + if (!legacyTransactionUsed && EVMChainResolver.isFeatureSupported(context.chainId, 'EIP1559')) { delete config.gasPrice if ( diff --git a/packages/web3-shared/evm/src/types/index.ts b/packages/web3-shared/evm/src/types/index.ts index 71bc51e21baa..7f1d938e237a 100644 --- a/packages/web3-shared/evm/src/types/index.ts +++ b/packages/web3-shared/evm/src/types/index.ts @@ -385,6 +385,7 @@ export interface Transaction { data?: string nonce?: number chainId?: number + type?: '0x0' | '0x1' | '0x2' // CELO feeCurrency?: string // address of the ERC20 contract to use to pay for gas and the gateway fee