Skip to content

Fix missing await in gas estimation#2642

Merged
bgravenorst merged 1 commit intoMetaMask:mainfrom
binarycryptodev:main
Jan 26, 2026
Merged

Fix missing await in gas estimation#2642
bgravenorst merged 1 commit intoMetaMask:mainfrom
binarycryptodev:main

Conversation

@binarycryptodev
Copy link
Contributor

@binarycryptodev binarycryptodev commented Jan 24, 2026

Fixes a bug where provider.estimateGas() was used without await, causing the transaction code to fail at runtime. The gas estimation now resolves correctly and works as intended.


Note

Fixes the ethers.js tutorial snippet to correctly await provider.estimateGas when deriving gasLimit, ensuring the example runs without runtime errors.

  • Update in send-a-transaction-ethers.md: change provider.estimateGas({...}) to await provider.estimateGas({...}) in the optional fine-tuning example

Written by Cursor Bugbot for commit 2d11460. This will update automatically on new commits. Configure here.

@binarycryptodev binarycryptodev requested review from a team as code owners January 24, 2026 07:10
@vercel
Copy link

vercel bot commented Jan 24, 2026

@binarycryptodev is attempting to deploy a commit to the Consensys Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Jan 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
metamask-docs Ready Ready Preview, Comment Jan 26, 2026 11:11pm

Request Review

Copy link
Contributor

@bgravenorst bgravenorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Thanks for the contribution @binarycryptodev

@bgravenorst bgravenorst merged commit 80f682a into MetaMask:main Jan 26, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants