Skip to content
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

fix: Gas changes for low Max base fee and Priority fee #28037

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

pedronfigueiredo
Copy link
Contributor

@pedronfigueiredo pedronfigueiredo commented Oct 23, 2024

Description

Previously, if the Max base fee and Priority fee were reduced to very low values, the Network fee wouldn't update accordingly. This is a discrepancy with the gas calculations in the old flows.

What fixes it is, for low enough values of maxFeePerGas (low enough to be lower than minimumFeePerGas), the Network fee becomes the Max fee -- maxFeePerGas times gasLimit directly. Apart from fixing the symptom explained above, this ensures that the Network fee is never higher than the Max fee.

The PR also fixes this calculation when it comes to the L2 fees (inside useTransactionGasFeeEstimate).

It also adds a missing override of dappSuggestedFees for both maxFeePerGas and maxPriorityFeePerGas (inside useEIP1559TxFees).

Open in GitHub Codespaces

Related issues

Fixes: #27802

Manual testing steps

See original report above.

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@pedronfigueiredo pedronfigueiredo added the team-confirmations Push issues to confirmations team label Oct 23, 2024
@pedronfigueiredo pedronfigueiredo self-assigned this Oct 23, 2024
@pedronfigueiredo pedronfigueiredo requested a review from a team as a code owner October 23, 2024 10:46
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot
Copy link
Collaborator

Builds ready [40b0571]
Page Load Metrics (1934 ± 76 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint16852514193316378
domContentLoaded16702489190415977
load17332508193415776
domInteractive2398452110
backgroundConnect136928189
firstReactRender48158922512
getState575202110
initialActions01000
loadScripts12041990141615172
setupStore1269302211
uiStartup18962690213815675
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 733 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

@pedronfigueiredo pedronfigueiredo added this pull request to the merge queue Oct 23, 2024
Merged via the queue into develop with commit a91c2d0 Oct 23, 2024
85 checks passed
@pedronfigueiredo pedronfigueiredo deleted the pnf/27802 branch October 23, 2024 15:52
@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2024
@metamaskbot metamaskbot added release-12.7.0 Issue or pull request that will be included in release 12.7.0 release-12.6.0 Issue or pull request that will be included in release 12.6.0 and removed release-12.7.0 Issue or pull request that will be included in release 12.7.0 labels Oct 23, 2024
@metamaskbot
Copy link
Collaborator

Missing release label release-12.6.0 on PR. Adding release label release-12.6.0 on PR and removing other release labels(release-12.7.0), as PR was cherry-picked in branch 12.6.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.6.0 Issue or pull request that will be included in release 12.6.0 team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Gas changes are not being reflected on confirmations page
4 participants