mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
remove EIP-1559 fields from txParams before calling estimateGas (#11368)
This commit is contained in:
parent
80e755afcb
commit
b6f514e293
@ -62,8 +62,11 @@ export default class TxGasUtil {
|
||||
// `eth_estimateGas` can fail if the user has insufficient balance for the
|
||||
// value being sent, or for the gas cost. We don't want to check their
|
||||
// balance here, we just want the gas estimate. The gas price is removed
|
||||
// to skip those balance checks. We check balance elsewhere.
|
||||
// to skip those balance checks. We check balance elsewhere. We also delete
|
||||
// maxFeePerGas and maxPriorityFeePerGas to support EIP-1559 txs.
|
||||
delete txParams.gasPrice;
|
||||
delete txParams.maxFeePerGas;
|
||||
delete txParams.maxPriorityFeePerGas;
|
||||
|
||||
// estimate tx gas requirements
|
||||
return await this.query.estimateGas(txParams);
|
||||
|
Loading…
Reference in New Issue
Block a user