1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Use current block gas limit as the limit passed eth_estimateGas (#11658)

This commit is contained in:
Dan J Miller 2021-07-28 15:13:08 -02:30 committed by GitHub
parent 447cb03621
commit aee79fd44d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -350,7 +350,7 @@ export const computeEstimatedGasLimit = createAsyncThunk(
if (send.stage !== SEND_STAGES.EDIT) {
const gasLimit = await estimateGasLimitForSend({
gasPrice: send.gas.gasPrice,
blockGasLimit: metamask.blockGasLimit,
blockGasLimit: metamask.currentBlockGasLimit,
selectedAddress: metamask.selectedAddress,
sendToken: send.asset.details,
to: send.recipient.address?.toLowerCase(),
@ -425,7 +425,7 @@ export const initializeSendState = createAsyncThunk(
// required gas. If this value isn't nullish, set it as the new gasLimit
const estimatedGasLimit = await estimateGasLimitForSend({
gasPrice: getGasPriceInHexWei(basicEstimates.average),
blockGasLimit: metamask.blockGasLimit,
blockGasLimit: metamask.currentBlockGasLimit,
selectedAddress: fromAddress,
sendToken: asset.details,
to: recipient.address.toLowerCase(),