-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Use gasLimitNoBuffer
on network fee estimation
#29502
Conversation
Builds ready [d96d86b]
Page Load Metrics (1734 ± 47 ms)
|
Builds ready [44608df]
Page Load Metrics (1756 ± 63 ms)
|
shared/modules/gas.utils.js
Outdated
gasPrice, | ||
maxPriorityFeePerGas, | ||
maxFeePerGas, | ||
baseFeePerGas, | ||
} = {}) { | ||
const minimumGasLimit = gasLimitNoBuffer ?? gasLimit; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relevant to my comment in the core PR, we wouldn't need the fallback here if we always populated gasLimitNoBuffer
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Updated dependencies detected. Learn more about Socket for GitHub ↗︎
|
Builds ready [60b0af0]
Page Load Metrics (1793 ± 99 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
While estimating gas for the transaction we add
50%
gas limit buffer. With this PR we want to show network fee without gas limit buffer usinggasLimitNoBuffer
property ontransactionMeta
.Related issues
Fixes: /~https://github.com/MetaMask/MetaMask-planning/issues/3773
Manual testing steps
N/A
Screenshots/Recordings
In the recording you will see that
gasLimitNoBuffer
used overtxParams.gas
. Please see thattxParams.gas
is greater thangasLimitNoBuffer
. This calculation leads lower value in the UI.Screen.Recording.2025-01-08.at.13.12.30.mov
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist